(function(){
var _1,_2,_3,_4,_5={},_6={},_7=/\\/g;
var _8=function(_9,_a){
if(_9==null){
return null;
}
if(_9.Slick===true){
return _9;
}
_9=(""+_9).replace(/^\s+|\s+$/g,"");
_4=!!_a;
var _b=(_4)?_6:_5;
if(_b[_9]){
return _b[_9];
}
_1={Slick:true,expressions:[],raw:_9,reverse:function(){
return _8(this.raw,true);
}};
_2=-1;
while(_9!=(_9=_9.replace(_c,parser))){
}
_1.length=_1.expressions.length;
return _b[_9]=(_4)?_d(_1):_1;
};
var _e=function(_f){
if(_f==="!"){
return " ";
}else{
if(_f===" "){
return "!";
}else{
if((/^!/).test(_f)){
return _f.replace(/^!/,"");
}else{
return "!"+_f;
}
}
}
};
var _d=function(_10){
var _11=_10.expressions;
for(var i=0;i<_11.length;i++){
var exp=_11[i];
var _14={parts:[],tag:"*",combinator:_e(exp[0].combinator)};
for(var j=0;j<exp.length;j++){
var _16=exp[j];
if(!_16.reverseCombinator){
_16.reverseCombinator=" ";
}
_16.combinator=_16.reverseCombinator;
delete _16.reverseCombinator;
}
exp.reverse().push(_14);
}
return _10;
};
var _17=function(_18){
return _18.replace(/[-[\]{}()*+?.\\^$|,#\s]/g,"\\$&");
};
var _c=new RegExp("^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|:+(<unicode>+)(?:\\((?:(?:([\"'])([^\\12]*)\\12)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(/<combinator>/,"["+_17(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])"));
function parser(_19,_1a,_1b,_1c,_1d,id,_1f,_20,_21,_22,_23,_24,_25,_26,_27){
if(_1a||_2===-1){
_1.expressions[++_2]=[];
_3=-1;
if(_1a){
return "";
}
}
if(_1b||_1c||_3===-1){
_1b=_1b||" ";
var _28=_1.expressions[_2];
if(_4&&_28[_3]){
_28[_3].reverseCombinator=_e(_1b);
}
_28[++_3]={combinator:_1b,tag:"*"};
}
var _29=_1.expressions[_2][_3];
if(_1d){
_29.tag=_1d.replace(_7,"");
}else{
if(id){
_29.id=id.replace(_7,"");
}else{
if(_1f){
_1f=_1f.replace(_7,"");
if(!_29.classList){
_29.classList=[];
}
if(!_29.classes){
_29.classes=[];
}
_29.classList.push(_1f);
_29.classes.push({value:_1f,regexp:new RegExp("(^|\\s)"+_17(_1f)+"(\\s|$)")});
}else{
if(_24){
_27=_27||_26;
_27=_27?_27.replace(_7,""):null;
if(!_29.pseudos){
_29.pseudos=[];
}
_29.pseudos.push({key:_24.replace(_7,""),value:_27});
}else{
if(_20){
_20=_20.replace(_7,"");
_23=(_23||"").replace(_7,"");
var _2a,_c;
switch(_21){
case "^=":
_c=new RegExp("^"+_17(_23));
break;
case "$=":
_c=new RegExp(_17(_23)+"$");
break;
case "~=":
_c=new RegExp("(^|\\s)"+_17(_23)+"(\\s|$)");
break;
case "|=":
_c=new RegExp("^"+_17(_23)+"(-|$)");
break;
case "=":
_2a=function(_2b){
return _23==_2b;
};
break;
case "*=":
_2a=function(_2c){
return _2c&&_2c.indexOf(_23)>-1;
};
break;
case "!=":
_2a=function(_2d){
return _23!=_2d;
};
break;
default:
_2a=function(_2e){
return !!_2e;
};
}
if(_23==""&&(/^[*$^]=$/).test(_21)){
_2a=function(){
return false;
};
}
if(!_2a){
_2a=function(_2f){
return _2f&&_c.test(_2f);
};
}
if(!_29.attributes){
_29.attributes=[];
}
_29.attributes.push({key:_20,operator:_21,value:_23,test:_2a});
}
}
}
}
}
return "";
}
var _30=(this.Slick||{});
_30.parse=function(_31){
return _8(_31);
};
_30.escapeRegExp=_17;
if(!this.Slick){
this.Slick=_30;
}
}).apply((typeof exports!="undefined")?exports:this);
(function(){
var _32=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,_33=0,_34=Object.prototype.toString,_35=false,_36=true;
[0,0].sort(function(){
_36=false;
return 0;
});
var _37=function(_38,_39,_3a,_3b){
_3a=_3a||[];
_39=_39||document;
var _3c=_39;
if(_39.nodeType!==1&&_39.nodeType!==9){
return [];
}
if(!_38||typeof _38!=="string"){
return _3a;
}
var m,set,_3f,_40,ret,cur,pop,i,_45=true,_46=_37.isXML(_39),_47=[],_48=_38;
do{
_32.exec("");
m=_32.exec(_48);
if(m){
_48=m[3];
_47.push(m[1]);
if(m[2]){
_40=m[3];
break;
}
}
}while(m);
if(_47.length>1&&_49.exec(_38)){
if(_47.length===2&&_4a.relative[_47[0]]){
set=_4b(_47[0]+_47[1],_39);
}else{
set=_4a.relative[_47[0]]?[_39]:_37(_47.shift(),_39);
while(_47.length){
_38=_47.shift();
if(_4a.relative[_38]){
_38+=_47.shift();
}
set=_4b(_38,set);
}
}
}else{
if(!_3b&&_47.length>1&&_39.nodeType===9&&!_46&&_4a.match.ID.test(_47[0])&&!_4a.match.ID.test(_47[_47.length-1])){
ret=_37.find(_47.shift(),_39,_46);
_39=ret.expr?_37.filter(ret.expr,ret.set)[0]:ret.set[0];
}
if(_39){
ret=_3b?{expr:_47.pop(),set:_4c(_3b)}:_37.find(_47.pop(),_47.length===1&&(_47[0]==="~"||_47[0]==="+")&&_39.parentNode?_39.parentNode:_39,_46);
set=ret.expr?_37.filter(ret.expr,ret.set):ret.set;
if(_47.length>0){
_3f=_4c(set);
}else{
_45=false;
}
while(_47.length){
cur=_47.pop();
pop=cur;
if(!_4a.relative[cur]){
cur="";
}else{
pop=_47.pop();
}
if(pop==null){
pop=_39;
}
_4a.relative[cur](_3f,pop,_46);
}
}else{
_3f=_47=[];
}
}
if(!_3f){
_3f=set;
}
if(!_3f){
_37.error(cur||_38);
}
if(_34.call(_3f)==="[object Array]"){
if(!_45){
_3a.push.apply(_3a,_3f);
}else{
if(_39&&_39.nodeType===1){
for(i=0;_3f[i]!=null;i++){
if(_3f[i]&&(_3f[i]===true||_3f[i].nodeType===1&&_37.contains(_39,_3f[i]))){
_3a.push(set[i]);
}
}
}else{
for(i=0;_3f[i]!=null;i++){
if(_3f[i]&&_3f[i].nodeType===1){
_3a.push(set[i]);
}
}
}
}
}else{
_4c(_3f,_3a);
}
if(_40){
_37(_40,_3c,_3a,_3b);
_37.uniqueSort(_3a);
}
return _3a;
};
_37.uniqueSort=function(_4d){
if(_4e){
_35=_36;
_4d.sort(_4e);
if(_35){
for(var i=1;i<_4d.length;i++){
if(_4d[i]===_4d[i-1]){
_4d.splice(i--,1);
}
}
}
}
return _4d;
};
_37.matches=function(_50,set){
return _37(_50,null,null,set);
};
_37.matchesSelector=function(_52,_53){
return _37(_53,null,null,[_52]).length>0;
};
_37.find=function(_54,_55,_56){
var set;
if(!_54){
return [];
}
for(var i=0,l=_4a.order.length;i<l;i++){
var _5a,_5b=_4a.order[i];
if((_5a=_4a.leftMatch[_5b].exec(_54))){
var _5c=_5a[1];
_5a.splice(1,1);
if(_5c.substr(_5c.length-1)!=="\\"){
_5a[1]=(_5a[1]||"").replace(/\\/g,"");
set=_4a.find[_5b](_5a,_55,_56);
if(set!=null){
_54=_54.replace(_4a.match[_5b],"");
break;
}
}
}
}
if(!set){
set=_55.getElementsByTagName("*");
}
return {set:set,expr:_54};
};
_37.filter=function(_5d,set,_5f,not){
var _61,_62,old=_5d,_64=[],_65=set,_66=set&&set[0]&&_37.isXML(set[0]);
while(_5d&&set.length){
for(var _67 in _4a.filter){
if((_61=_4a.leftMatch[_67].exec(_5d))!=null&&_61[2]){
var _68,_69,_6a=_4a.filter[_67],_6b=_61[1];
_62=false;
_61.splice(1,1);
if(_6b.substr(_6b.length-1)==="\\"){
continue;
}
if(_65===_64){
_64=[];
}
if(_4a.preFilter[_67]){
_61=_4a.preFilter[_67](_61,_65,_5f,_64,not,_66);
if(!_61){
_62=_68=true;
}else{
if(_61===true){
continue;
}
}
}
if(_61){
for(var i=0;(_69=_65[i])!=null;i++){
if(_69){
_68=_6a(_69,_61,i,_65);
var _6d=not^!!_68;
if(_5f&&_68!=null){
if(_6d){
_62=true;
}else{
_65[i]=false;
}
}else{
if(_6d){
_64.push(_69);
_62=true;
}
}
}
}
}
if(_68!==undefined){
if(!_5f){
_65=_64;
}
_5d=_5d.replace(_4a.match[_67],"");
if(!_62){
return [];
}
break;
}
}
}
if(_5d===old){
if(_62==null){
_37.error(_5d);
}else{
break;
}
}
old=_5d;
}
return _65;
};
_37.error=function(msg){
throw "Syntax error, unrecognized expression: "+msg;
};
var _4a=_37.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(_6f){
return _6f.getAttribute("href");
}},relative:{"+":function(_70,_71){
var _72=typeof _71==="string",_73=_72&&!/\W/.test(_71),_74=_72&&!_73;
if(_73){
_71=_71.toLowerCase();
}
for(var i=0,l=_70.length,_77;i<l;i++){
if((_77=_70[i])){
while((_77=_77.previousSibling)&&_77.nodeType!==1){
}
_70[i]=_74||_77&&_77.nodeName.toLowerCase()===_71?_77||false:_77===_71;
}
}
if(_74){
_37.filter(_71,_70,true);
}
},">":function(_78,_79){
var _7a,_7b=typeof _79==="string",i=0,l=_78.length;
if(_7b&&!/\W/.test(_79)){
_79=_79.toLowerCase();
for(;i<l;i++){
_7a=_78[i];
if(_7a){
var _7e=_7a.parentNode;
_78[i]=_7e.nodeName.toLowerCase()===_79?_7e:false;
}
}
}else{
for(;i<l;i++){
_7a=_78[i];
if(_7a){
_78[i]=_7b?_7a.parentNode:_7a.parentNode===_79;
}
}
if(_7b){
_37.filter(_79,_78,true);
}
}
},"":function(_7f,_80,_81){
var _82,_83=_33++,_84=dirCheck;
if(typeof _80==="string"&&!/\W/.test(_80)){
_80=_80.toLowerCase();
_82=_80;
_84=dirNodeCheck;
}
_84("parentNode",_80,_83,_7f,_82,_81);
},"~":function(_85,_86,_87){
var _88,_89=_33++,_8a=dirCheck;
if(typeof _86==="string"&&!/\W/.test(_86)){
_86=_86.toLowerCase();
_88=_86;
_8a=dirNodeCheck;
}
_8a("previousSibling",_86,_89,_85,_88,_87);
}},find:{ID:function(_8b,_8c,_8d){
if(typeof _8c.getElementById!=="undefined"&&!_8d){
var m=_8c.getElementById(_8b[1]);
return m&&m.parentNode?[m]:[];
}
},NAME:function(_8f,_90){
if(typeof _90.getElementsByName!=="undefined"){
var ret=[],_92=_90.getElementsByName(_8f[1]);
for(var i=0,l=_92.length;i<l;i++){
if(_92[i].getAttribute("name")===_8f[1]){
ret.push(_92[i]);
}
}
return ret.length===0?null:ret;
}
},TAG:function(_95,_96){
return _96.getElementsByTagName(_95[1]);
}},preFilter:{CLASS:function(_97,_98,_99,_9a,not,_9c){
_97=" "+_97[1].replace(/\\/g,"")+" ";
if(_9c){
return _97;
}
for(var i=0,_9e;(_9e=_98[i])!=null;i++){
if(_9e){
if(not^(_9e.className&&(" "+_9e.className+" ").replace(/[\t\n\r]/g," ").indexOf(_97)>=0)){
if(!_99){
_9a.push(_9e);
}
}else{
if(_99){
_98[i]=false;
}
}
}
}
return false;
},ID:function(_9f){
return _9f[1].replace(/\\/g,"");
},TAG:function(_a0,_a1){
return _a0[1].toLowerCase();
},CHILD:function(_a2){
if(_a2[1]==="nth"){
if(!_a2[2]){
_37.error(_a2[0]);
}
_a2[2]=_a2[2].replace(/^\+|\s*/g,"");
var _a3=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(_a2[2]==="even"&&"2n"||_a2[2]==="odd"&&"2n+1"||!/\D/.test(_a2[2])&&"0n+"+_a2[2]||_a2[2]);
_a2[2]=(_a3[1]+(_a3[2]||1))-0;
_a2[3]=_a3[3]-0;
}else{
if(_a2[2]){
_37.error(_a2[0]);
}
}
_a2[0]=_33++;
return _a2;
},ATTR:function(_a4,_a5,_a6,_a7,not,_a9){
var _aa=_a4[1].replace(/\\/g,"");
if(!_a9&&_4a.attrMap[_aa]){
_a4[1]=_4a.attrMap[_aa];
}
if(_a4[2]==="~="){
_a4[4]=" "+_a4[4]+" ";
}
return _a4;
},PSEUDO:function(_ab,_ac,_ad,_ae,not){
if(_ab[1]==="not"){
if((_32.exec(_ab[3])||"").length>1||/^\w/.test(_ab[3])){
_ab[3]=_37(_ab[3],null,null,_ac);
}else{
var ret=_37.filter(_ab[3],_ac,_ad,true^not);
if(!_ad){
_ae.push.apply(_ae,ret);
}
return false;
}
}else{
if(_4a.match.POS.test(_ab[0])||_4a.match.CHILD.test(_ab[0])){
return true;
}
}
return _ab;
},POS:function(_b1){
_b1.unshift(true);
return _b1;
}},filters:{enabled:function(_b2){
return _b2.disabled===false&&_b2.type!=="hidden";
},disabled:function(_b3){
return _b3.disabled===true;
},checked:function(_b4){
return _b4.checked===true;
},selected:function(_b5){
_b5.parentNode.selectedIndex;
return _b5.selected===true;
},parent:function(_b6){
return !!_b6.firstChild;
},empty:function(_b7){
return !_b7.firstChild;
},has:function(_b8,i,_ba){
return !!_37(_ba[3],_b8).length;
},header:function(_bb){
return (/h\d/i).test(_bb.nodeName);
},text:function(_bc){
return "text"===_bc.type;
},radio:function(_bd){
return "radio"===_bd.type;
},checkbox:function(_be){
return "checkbox"===_be.type;
},file:function(_bf){
return "file"===_bf.type;
},password:function(_c0){
return "password"===_c0.type;
},submit:function(_c1){
return "submit"===_c1.type;
},image:function(_c2){
return "image"===_c2.type;
},reset:function(_c3){
return "reset"===_c3.type;
},button:function(_c4){
return "button"===_c4.type||_c4.nodeName.toLowerCase()==="button";
},input:function(_c5){
return (/input|select|textarea|button/i).test(_c5.nodeName);
}},setFilters:{first:function(_c6,i){
return i===0;
},last:function(_c8,i,_ca,_cb){
return i===_cb.length-1;
},even:function(_cc,i){
return i%2===0;
},odd:function(_ce,i){
return i%2===1;
},lt:function(_d0,i,_d2){
return i<_d2[3]-0;
},gt:function(_d3,i,_d5){
return i>_d5[3]-0;
},nth:function(_d6,i,_d8){
return _d8[3]-0===i;
},eq:function(_d9,i,_db){
return _db[3]-0===i;
}},filter:{PSEUDO:function(_dc,_dd,i,_df){
var _e0=_dd[1],_e1=_4a.filters[_e0];
if(_e1){
return _e1(_dc,i,_dd,_df);
}else{
if(_e0==="contains"){
return (_dc.textContent||_dc.innerText||_37.getText([_dc])||"").indexOf(_dd[3])>=0;
}else{
if(_e0==="not"){
var not=_dd[3];
for(var j=0,l=not.length;j<l;j++){
if(not[j]===_dc){
return false;
}
}
return true;
}else{
_37.error(_e0);
}
}
}
},CHILD:function(_e5,_e6){
var _e7=_e6[1],_e8=_e5;
switch(_e7){
case "only":
case "first":
while((_e8=_e8.previousSibling)){
if(_e8.nodeType===1){
return false;
}
}
if(_e7==="first"){
return true;
}
_e8=_e5;
case "last":
while((_e8=_e8.nextSibling)){
if(_e8.nodeType===1){
return false;
}
}
return true;
case "nth":
var _e9=_e6[2],_ea=_e6[3];
if(_e9===1&&_ea===0){
return true;
}
var _eb=_e6[0],_ec=_e5.parentNode;
if(_ec&&(_ec.sizcache!==_eb||!_e5.nodeIndex)){
var _ed=0;
for(_e8=_ec.firstChild;_e8;_e8=_e8.nextSibling){
if(_e8.nodeType===1){
_e8.nodeIndex=++_ed;
}
}
_ec.sizcache=_eb;
}
var _ee=_e5.nodeIndex-_ea;
if(_e9===0){
return _ee===0;
}else{
return (_ee%_e9===0&&_ee/_e9>=0);
}
}
},ID:function(_ef,_f0){
return _ef.nodeType===1&&_ef.getAttribute("id")===_f0;
},TAG:function(_f1,_f2){
return (_f2==="*"&&_f1.nodeType===1)||_f1.nodeName.toLowerCase()===_f2;
},CLASS:function(_f3,_f4){
return (" "+(_f3.className||_f3.getAttribute("class"))+" ").indexOf(_f4)>-1;
},ATTR:function(_f5,_f6){
var _f7=_f6[1],_f8=_4a.attrHandle[_f7]?_4a.attrHandle[_f7](_f5):_f5[_f7]!=null?_f5[_f7]:_f5.getAttribute(_f7),_f9=_f8+"",_fa=_f6[2],_fb=_f6[4];
return _f8==null?_fa==="!=":_fa==="="?_f9===_fb:_fa==="*="?_f9.indexOf(_fb)>=0:_fa==="~="?(" "+_f9+" ").indexOf(_fb)>=0:!_fb?_f9&&_f8!==false:_fa==="!="?_f9!==_fb:_fa==="^="?_f9.indexOf(_fb)===0:_fa==="$="?_f9.substr(_f9.length-_fb.length)===_fb:_fa==="|="?_f9===_fb||_f9.substr(0,_fb.length+1)===_fb+"-":false;
},POS:function(_fc,_fd,i,_ff){
var name=_fd[2],_101=_4a.setFilters[name];
if(_101){
return _101(_fc,i,_fd,_ff);
}
}}};
var _49=_4a.match.POS,_102=function(all,num){
return "\\"+(num-0+1);
};
for(var type in _4a.match){
_4a.match[type]=new RegExp(_4a.match[type].source+(/(?![^\[]*\])(?![^\(]*\))/.source));
_4a.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+_4a.match[type].source.replace(/\\(\d+)/g,_102));
}
var _4c=function(_106,_107){
_106=Array.prototype.slice.call(_106,0);
if(_107){
_107.push.apply(_107,_106);
return _107;
}
return _106;
};
try{
Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;
}
catch(e){
_4c=function(_108,_109){
var i=0,ret=_109||[];
if(_34.call(_108)==="[object Array]"){
Array.prototype.push.apply(ret,_108);
}else{
if(typeof _108.length==="number"){
for(var l=_108.length;i<l;i++){
ret.push(_108[i]);
}
}else{
for(;_108[i];i++){
ret.push(_108[i]);
}
}
}
return ret;
};
}
var _4e,_10d;
if(document.documentElement.compareDocumentPosition){
_4e=function(a,b){
if(a===b){
_35=true;
return 0;
}
if(!a.compareDocumentPosition||!b.compareDocumentPosition){
return a.compareDocumentPosition?-1:1;
}
return a.compareDocumentPosition(b)&4?-1:1;
};
}else{
_4e=function(a,b){
var al,bl,ap=[],bp=[],aup=a.parentNode,bup=b.parentNode,cur=aup;
if(a===b){
_35=true;
return 0;
}else{
if(aup===bup){
return _10d(a,b);
}else{
if(!aup){
return -1;
}else{
if(!bup){
return 1;
}
}
}
}
while(cur){
ap.unshift(cur);
cur=cur.parentNode;
}
cur=bup;
while(cur){
bp.unshift(cur);
cur=cur.parentNode;
}
al=ap.length;
bl=bp.length;
for(var i=0;i<al&&i<bl;i++){
if(ap[i]!==bp[i]){
return _10d(ap[i],bp[i]);
}
}
return i===al?_10d(a,bp[i],-1):_10d(ap[i],b,1);
};
_10d=function(a,b,ret){
if(a===b){
return ret;
}
var cur=a.nextSibling;
while(cur){
if(cur===b){
return -1;
}
cur=cur.nextSibling;
}
return 1;
};
}
_37.getText=function(_11e){
var ret="",elem;
for(var i=0;_11e[i];i++){
elem=_11e[i];
if(elem.nodeType===3||elem.nodeType===4){
ret+=elem.nodeValue;
}else{
if(elem.nodeType!==8){
ret+=_37.getText(elem.childNodes);
}
}
}
return ret;
};
(function(){
var form=document.createElement("div"),id="script"+(new Date()).getTime(),root=document.documentElement;
form.innerHTML="<a name='"+id+"'/>";
root.insertBefore(form,root.firstChild);
if(document.getElementById(id)){
_4a.find.ID=function(_125,_126,_127){
if(typeof _126.getElementById!=="undefined"&&!_127){
var m=_126.getElementById(_125[1]);
return m?m.id===_125[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===_125[1]?[m]:undefined:[];
}
};
_4a.filter.ID=function(elem,_12a){
var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");
return elem.nodeType===1&&node&&node.nodeValue===_12a;
};
}
root.removeChild(form);
root=form=null;
})();
(function(){
var div=document.createElement("div");
div.appendChild(document.createComment(""));
if(div.getElementsByTagName("*").length>0){
_4a.find.TAG=function(_12d,_12e){
var _12f=_12e.getElementsByTagName(_12d[1]);
if(_12d[1]==="*"){
var tmp=[];
for(var i=0;_12f[i];i++){
if(_12f[i].nodeType===1){
tmp.push(_12f[i]);
}
}
_12f=tmp;
}
return _12f;
};
}
div.innerHTML="<a href='#'></a>";
if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){
_4a.attrHandle.href=function(elem){
return elem.getAttribute("href",2);
};
}
div=null;
})();
if(document.querySelectorAll){
(function(){
var _133=_37,div=document.createElement("div"),id="__sizzle__";
div.innerHTML="<p class='TEST'></p>";
if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){
return;
}
_37=function(_136,_137,_138,seed){
_137=_137||document;
_136=_136.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");
if(!seed&&!_37.isXML(_137)){
if(_137.nodeType===9){
try{
return _4c(_137.querySelectorAll(_136),_138);
}
catch(qsaError){
}
}else{
if(_137.nodeType===1&&_137.nodeName.toLowerCase()!=="object"){
var old=_137.getAttribute("id"),nid=old||id,_13c=_137.parentNode,_13d=/^\s*[+~]/.test(_136);
if(!old){
_137.setAttribute("id",nid);
}else{
nid=nid.replace(/'/g,"\\$&");
}
if(_13d&&_13c){
_137=_137.parentNode;
}
try{
if(!_13d||_13c){
return _4c(_137.querySelectorAll("[id='"+nid+"'] "+_136),_138);
}
}
catch(pseudoError){
}
finally{
if(!old){
_137.removeAttribute("id");
}
}
}
}
}
return _133(_136,_137,_138,seed);
};
for(var prop in _133){
_37[prop]=_133[prop];
}
div=null;
})();
}
(function(){
var html=document.documentElement,_140=html.matchesSelector||html.mozMatchesSelector||html.webkitMatchesSelector||html.msMatchesSelector,_141=false;
try{
_140.call(document.documentElement,"[test!='']:sizzle");
}
catch(pseudoError){
_141=true;
}
if(_140){
_37.matchesSelector=function(node,expr){
expr=expr.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");
if(!_37.isXML(node)){
try{
if(_141||!_4a.match.PSEUDO.test(expr)&&!/!=/.test(expr)){
return _140.call(node,expr);
}
}
catch(e){
}
}
return _37(expr,null,null,[node]).length>0;
};
}
})();
(function(){
var div=document.createElement("div");
div.innerHTML="<div class='test e'></div><div class='test'></div>";
if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0){
return;
}
div.lastChild.className="e";
if(div.getElementsByClassName("e").length===1){
return;
}
_4a.order.splice(1,0,"CLASS");
_4a.find.CLASS=function(_145,_146,_147){
if(typeof _146.getElementsByClassName!=="undefined"&&!_147){
return _146.getElementsByClassName(_145[1]);
}
};
div=null;
})();
function dirNodeCheck(dir,cur,_14a,_14b,_14c,_14d){
for(var i=0,l=_14b.length;i<l;i++){
var elem=_14b[i];
if(elem){
var _151=false;
elem=elem[dir];
while(elem){
if(elem.sizcache===_14a){
_151=_14b[elem.sizset];
break;
}
if(elem.nodeType===1&&!_14d){
elem.sizcache=_14a;
elem.sizset=i;
}
if(elem.nodeName.toLowerCase()===cur){
_151=elem;
break;
}
elem=elem[dir];
}
_14b[i]=_151;
}
}
}
function dirCheck(dir,cur,_154,_155,_156,_157){
for(var i=0,l=_155.length;i<l;i++){
var elem=_155[i];
if(elem){
var _15b=false;
elem=elem[dir];
while(elem){
if(elem.sizcache===_154){
_15b=_155[elem.sizset];
break;
}
if(elem.nodeType===1){
if(!_157){
elem.sizcache=_154;
elem.sizset=i;
}
if(typeof cur!=="string"){
if(elem===cur){
_15b=true;
break;
}
}else{
if(_37.filter(cur,[elem]).length>0){
_15b=elem;
break;
}
}
}
elem=elem[dir];
}
_155[i]=_15b;
}
}
}
if(document.documentElement.contains){
_37.contains=function(a,b){
return a!==b&&(a.contains?a.contains(b):true);
};
}else{
if(document.documentElement.compareDocumentPosition){
_37.contains=function(a,b){
return !!(a.compareDocumentPosition(b)&16);
};
}else{
_37.contains=function(){
return false;
};
}
}
_37.isXML=function(elem){
var _161=(elem?elem.ownerDocument||elem:0).documentElement;
return _161?_161.nodeName!=="HTML":false;
};
var _4b=function(_162,_163){
var _164,_165=[],_166="",root=_163.nodeType?[_163]:_163;
while((_164=_4a.match.PSEUDO.exec(_162))){
_166+=_164[0];
_162=_162.replace(_4a.match.PSEUDO,"");
}
_162=_4a.relative[_162]?_162+"*":_162;
for(var i=0,l=root.length;i<l;i++){
_37(_162,root[i],_165);
}
return _37.filter(_166,_165);
};
window.Sizzle=_37;
})();
var Mustache=function(){
var _16a=function(){
};
_16a.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},context:{},render:function(_16b,_16c,_16d,_16e){
if(!_16e){
this.context=_16c;
this.buffer=[];
}
if(!this.includes("",_16b)){
if(_16e){
return _16b;
}else{
this.send(_16b);
return;
}
}
_16b=this.render_pragmas(_16b);
var html=this.render_section(_16b,_16c,_16d);
if(_16e){
return this.render_tags(html,_16c,_16d,_16e);
}
this.render_tags(html,_16c,_16d,_16e);
},send:function(line){
if(line!=""){
this.buffer.push(line);
}
},render_pragmas:function(_171){
if(!this.includes("%",_171)){
return _171;
}
var that=this;
var _173=new RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag);
return _171.replace(_173,function(_174,_175,_176){
if(!that.pragmas_implemented[_175]){
throw ({message:"This implementation of mustache doesn't understand the '"+_175+"' pragma"});
}
that.pragmas[_175]={};
if(_176){
var opts=_176.split("=");
that.pragmas[_175][opts[0]]=opts[1];
}
return "";
});
},render_partial:function(name,_179,_17a){
name=this.trim(name);
if(!_17a||_17a[name]===undefined){
throw ({message:"unknown_partial '"+name+"'"});
}
if(typeof (_179[name])!="object"){
return this.render(_17a[name],_179,_17a,true);
}
return this.render(_17a[name],_179[name],_17a,true);
},render_section:function(_17b,_17c,_17d){
if(!this.includes("#",_17b)&&!this.includes("^",_17b)){
return _17b;
}
var that=this;
var _17f=new RegExp(this.otag+"(\\^|\\#)\\s*(.+)\\s*"+this.ctag+"\n*([\\s\\S]+?)"+this.otag+"\\/\\s*\\2\\s*"+this.ctag+"\\s*","mg");
return _17b.replace(_17f,function(_180,type,name,_183){
var _184=that.find(name,_17c);
if(type=="^"){
if(!_184||that.is_array(_184)&&_184.length===0){
return that.render(_183,_17c,_17d,true);
}else{
return "";
}
}else{
if(type=="#"){
if(that.is_array(_184)){
return that.map(_184,function(row){
return that.render(_183,that.create_context(row),_17d,true);
}).join("");
}else{
if(that.is_object(_184)){
return that.render(_183,that.create_context(_184),_17d,true);
}else{
if(typeof _184==="function"){
return _184.call(_17c,_183,function(text){
return that.render(text,_17c,_17d,true);
});
}else{
if(_184){
return that.render(_183,_17c,_17d,true);
}else{
return "";
}
}
}
}
}
}
});
},render_tags:function(_187,_188,_189,_18a){
var that=this;
var _18c=function(){
return new RegExp(that.otag+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+that.ctag+"+","g");
};
var _18d=_18c();
var _18e=function(_18f,_190,name){
switch(_190){
case "!":
return "";
case "=":
that.set_delimiters(name);
_18d=_18c();
return "";
case ">":
return that.render_partial(name,_188,_189);
case "{":
return that.find(name,_188);
default:
return that.escape(that.find(name,_188));
}
};
var _192=_187.split("\n");
for(var i=0;i<_192.length;i++){
_192[i]=_192[i].replace(_18d,_18e,this);
if(!_18a){
this.send(_192[i]);
}
}
if(_18a){
return _192.join("\n");
}
},set_delimiters:function(_194){
var dels=_194.split(" ");
this.otag=this.escape_regex(dels[0]);
this.ctag=this.escape_regex(dels[1]);
},escape_regex:function(text){
if(!arguments.callee.sRE){
var _197=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];
arguments.callee.sRE=new RegExp("(\\"+_197.join("|\\")+")","g");
}
return text.replace(arguments.callee.sRE,"\\$1");
},find:function(name,_199){
name=this.trim(name);
function is_kinda_truthy(bool){
return bool===false||bool===0||bool;
}
var _19b;
if(is_kinda_truthy(_199[name])){
_19b=_199[name];
}else{
if(is_kinda_truthy(this.context[name])){
_19b=this.context[name];
}
}
if(typeof _19b==="function"){
return _19b.apply(_199);
}
if(_19b!==undefined){
return _19b;
}
return "";
},includes:function(_19c,_19d){
return _19d.indexOf(this.otag+_19c)!=-1;
},escape:function(s){
s=String(s===null?"":s);
return s.replace(/&(?!\w+;)|["'<>\\]/g,function(s){
switch(s){
case "&":
return "&amp;";
case "\\":
return "\\\\";
case "\"":
return "&quot;";
case "'":
return "&#39;";
case "<":
return "&lt;";
case ">":
return "&gt;";
default:
return s;
}
});
},create_context:function(_1a0){
if(this.is_object(_1a0)){
return _1a0;
}else{
var _1a1=".";
if(this.pragmas["IMPLICIT-ITERATOR"]){
_1a1=this.pragmas["IMPLICIT-ITERATOR"].iterator;
}
var ctx={};
ctx[_1a1]=_1a0;
return ctx;
}
},is_object:function(a){
return a&&typeof a=="object";
},is_array:function(a){
return Object.prototype.toString.call(a)==="[object Array]";
},trim:function(s){
return s.replace(/^\s*|\s*$/g,"");
},map:function(_1a6,fn){
if(typeof _1a6.map=="function"){
return _1a6.map(fn);
}else{
var r=[];
var l=_1a6.length;
for(var i=0;i<l;i++){
r.push(fn(_1a6[i]));
}
return r;
}
}};
return ({name:"mustache.js",version:"0.3.1-dev",to_html:function(_1ab,view,_1ad,_1ae){
var _1af=new _16a();
if(_1ae){
_1af.send=_1ae;
}
_1af.render(_1ab,view,_1ad);
if(!_1ae){
return _1af.buffer.join("\n");
}
}});
}();
if(!this.JSON){
this.JSON={};
}
(function(){
"use strict";
function f(n){
return n<10?"0"+n:n;
}
if(typeof Date.prototype.toJSON!=="function"){
Date.prototype.toJSON=function(key){
return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;
};
String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){
return this.valueOf();
};
}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_1b4=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,_1b6,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},rep;
function quote(_1b9){
_1b4.lastIndex=0;
return _1b4.test(_1b9)?"\""+_1b9.replace(_1b4,function(a){
var c=meta[a];
return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
})+"\"":"\""+_1b9+"\"";
}
function str(key,_1bd){
var i,k,v,_1c1,mind=gap,_1c3,_1c4=_1bd[key];
if(_1c4&&typeof _1c4==="object"&&typeof _1c4.toJSON==="function"){
_1c4=_1c4.toJSON(key);
}
if(typeof rep==="function"){
_1c4=rep.call(_1bd,key,_1c4);
}
switch(typeof _1c4){
case "string":
return quote(_1c4);
case "number":
return isFinite(_1c4)?String(_1c4):"null";
case "boolean":
case "null":
return String(_1c4);
case "object":
if(!_1c4){
return "null";
}
gap+=_1b6;
_1c3=[];
if(Object.prototype.toString.apply(_1c4)==="[object Array]"){
_1c1=_1c4.length;
for(i=0;i<_1c1;i+=1){
_1c3[i]=str(i,_1c4)||"null";
}
v=_1c3.length===0?"[]":gap?"[\n"+gap+_1c3.join(",\n"+gap)+"\n"+mind+"]":"["+_1c3.join(",")+"]";
gap=mind;
return v;
}
if(rep&&typeof rep==="object"){
_1c1=rep.length;
for(i=0;i<_1c1;i+=1){
k=rep[i];
if(typeof k==="string"){
v=str(k,_1c4);
if(v){
_1c3.push(quote(k)+(gap?": ":":")+v);
}
}
}
}else{
for(k in _1c4){
if(Object.hasOwnProperty.call(_1c4,k)){
v=str(k,_1c4);
if(v){
_1c3.push(quote(k)+(gap?": ":":")+v);
}
}
}
}
v=_1c3.length===0?"{}":gap?"{\n"+gap+_1c3.join(",\n"+gap)+"\n"+mind+"}":"{"+_1c3.join(",")+"}";
gap=mind;
return v;
}
}
if(typeof JSON.stringify!=="function"){
JSON.stringify=function(_1c5,_1c6,_1c7){
var i;
gap="";
_1b6="";
if(typeof _1c7==="number"){
for(i=0;i<_1c7;i+=1){
_1b6+=" ";
}
}else{
if(typeof _1c7==="string"){
_1b6=_1c7;
}
}
rep=_1c6;
if(_1c6&&typeof _1c6!=="function"&&(typeof _1c6!=="object"||typeof _1c6.length!=="number")){
throw new Error("JSON.stringify");
}
return str("",{"":_1c5});
};
}
if(typeof JSON.parse!=="function"){
JSON.parse=function(text,_1ca){
var j;
function walk(_1cc,key){
var k,v,_1d0=_1cc[key];
if(_1d0&&typeof _1d0==="object"){
for(k in _1d0){
if(Object.hasOwnProperty.call(_1d0,k)){
v=walk(_1d0,k);
if(v!==undefined){
_1d0[k]=v;
}else{
delete _1d0[k];
}
}
}
}
return _1ca.call(_1cc,key,_1d0);
}
text=String(text);
cx.lastIndex=0;
if(cx.test(text)){
text=text.replace(cx,function(a){
return "\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
});
}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){
j=eval("("+text+")");
return typeof _1ca==="function"?walk({"":j},""):j;
}
throw new SyntaxError("JSON.parse");
};
}
}());
var object=new (function(_1d2){
var _1d3=this;
Object.keys=function(o){
var _1d5=[];
for(var name in o){
if(o.hasOwnProperty(name)){
_1d5.push(name);
}
}
if(o.call!==undefined&&o.call!==Function.prototype.call&&_1d5.indexOf("call")===-1){
_1d5.push("call");
}
return _1d5;
};
Array.isArray=Array.isArray||function(o){
return Object.prototype.toString.call(o)==="[object Array]";
};
Array.prototype.forEach=Array.prototype.forEach||function(fn,bind){
for(var i=0;i<this.length;i++){
fn.call(bind,this[i],i,this);
}
};
Array.prototype.indexOf=Array.prototype.indexOf||function(str){
for(var i=0;i<this.length;i++){
if(str==this[i]){
return i;
}
}
return -1;
};
Array.prototype.some=Array.prototype.some||function(fn,bind){
for(var i=0,l=this.length;i<l;i++){
if((i in this)&&fn.call(bind,this[i],i,this)){
return true;
}
}
return false;
};
Array.prototype.every=Array.prototype.every||function(fn,bind){
for(var i=0,l=this.length;i<l;i++){
if((i in this)&&!fn.call(bind,this[i],i,this)){
return false;
}
}
return true;
};
Array.prototype.map=Array.prototype.map||function(fn,bind){
var _1e7=[];
for(var i=0,l=this.length;i<l;i++){
if(i in this){
_1e7[i]=fn.call(bind,this[i],i,this);
}
}
return _1e7;
};
Array.prototype.filter=Array.prototype.filter||function(fn,bind){
var _1ec=[];
for(var i=0,l=this.length;i<l;i++){
if((i in this)&&fn.call(bind,this[i],i,this)){
_1ec.push(this[i]);
}
}
return _1ec;
};
Array.prototype.reduce=Array.prototype.reduce||function(fun){
"use strict";
if(this===undefined||this===null){
throw new TypeError();
}
var t=Object(this);
var len=t.length>>>0;
if(typeof fun!=="function"){
throw new TypeError();
}
if(len===0&&arguments.length==1){
throw new TypeError();
}
var k=0;
var _1f3;
if(arguments.length>=2){
_1f3=arguments[1];
}else{
do{
if(k in t){
_1f3=t[k++];
break;
}
if(++k>=len){
throw new TypeError();
}
}while(true);
}
while(k<len){
if(k in t){
_1f3=fun.call(undefined,_1f3,t[k],k,t);
}
k++;
}
return _1f3;
};
Array.prototype.reduceRight=Array.prototype.reduceRight||function(_1f4){
"use strict";
if(this===undefined||this===null){
throw new TypeError();
}
var t=Object(this);
var len=t.length>>>0;
if(typeof _1f4!=="function"){
throw new TypeError();
}
if(len===0&&arguments.length===1){
throw new TypeError();
}
var k=len-1;
var _1f8;
if(arguments.length>=2){
_1f8=arguments[1];
}else{
do{
if(k in this){
_1f8=this[k--];
break;
}
if(--k<0){
throw new TypeError();
}
}while(true);
}
while(k>=0){
if(k in t){
_1f8=_1f4.call(undefined,_1f8,t[k],k,t);
}
k--;
}
return _1f8;
};
String.prototype.trim=String.prototype.trim||function(){
return this.replace(/^\s\s*/,"").replace(/\s\s*$/,"");
};
if(!Function.prototype.bind||Function.prototype.bind===window.__hualuOldBind){
Function.prototype.bind=function(_1f9){
var _1fa=this;
return function(){
_1fa.apply(_1f9,arguments);
};
};
}
if((function TEST(){
}).name){
Function.__get_name__=function(func){
return func.name;
};
}else{
var _1fc=/^function ([\w$]+)/;
Function.__get_name__=function(func){
var _1fe=_1fc.exec(func.toString());
if(_1fe){
return _1fe[1];
}
return "";
};
}
this.extend=function(obj,_200,ov){
if(ov!==false){
ov=true;
}
for(var _202 in _200){
if(ov||obj[_202]===undefined){
obj[_202]=_200[_202];
}
}
if(_200&&_200.hasOwnProperty("call")){
obj.call=_200.call;
}
return obj;
};
this.clone=function(obj){
var _204={};
for(var key in obj){
_204[key]=obj[key];
}
return _204;
};
this.bind=function(host){
_1d3.extend(host,_1d3);
};
this._loader=null;
this.use=function(){
if(!_1d3._loader){
_1d3._loader=new Loader();
}
_1d3._loader.use.apply(_1d3._loader,arguments);
};
this.execute=function(){
if(!_1d3._loader){
_1d3._loader=new Loader();
}
_1d3._loader.execute.apply(_1d3._loader,arguments);
};
this.add=function(){
if(!_1d3._loader){
_1d3._loader=new Loader();
}
_1d3._loader.add.apply(_1d3._loader,arguments);
};
})(window);
if(!window.PROTOTYPING){
window.PROTOTYPING={foo:true};
}
(function(){
var _207=true;
for(var i in {toString:1}){
_207=null;
}
if(_207){
_207=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];
}
var _209=function(func,_20b){
return function(a,b){
if(a===null){
return this;
}
if(_20b||typeof a!="string"){
for(var k in a){
func.call(this,k,a[k]);
}
if(_207){
for(var i=_207.length;i>0;i--){
k=_207[i];
if(a.hasOwnProperty(k)){
func.call(this,k,a[k]);
}
}
}
}else{
func.call(this,a,b);
}
return this;
};
};
var _210=function(prop){
var _212=this.__properties__[prop];
if(_212&&_212.fget){
return _212.fget.call(this.__this__,this);
}else{
throw "get not defined property "+prop;
}
};
var _213=function(prop,_215){
var _216=this.__properties__[prop];
if(_216&&_216.fset){
_216.fset.call(this.__this__,this,_215);
}else{
throw "set not defined property "+prop;
}
};
var _217=function(prop,_219){
this[prop]=_219;
};
var _21a=_209(function(name,_21c){
var cls=this;
var _21e=cls.prototype;
if(name=="__metaclass__"){
cls[name]=_21c;
}else{
if(name=="__this__"){
cls[name]=_21e[name]=_21c;
}else{
if(_21c==null){
cls[name]=_21e[name]=_21c;
}else{
if(_21c.__class__===undefined&&typeof _21c=="function"){
_21c.__name__=name;
cls[name]=function(){
return this.prototype[name].im_func.apply(this.__this__,arguments);
};
cls[name].__class__=_21f;
_21e[name]=_21f(_21c);
}else{
if(_21c.__class__===_220){
_21c.im_func.__name__=name;
cls[name]=_21e[name]=_21c;
}else{
if(_21c.__class__===_221){
_21c.im_func.__name__=name;
cls[name]=_21e[name]=_21c;
}else{
if(_21c.__class__===_222){
_21c.__name__=name;
cls[name]=_21c;
_21e.__properties__[name]=_21c;
}else{
cls[name]=_21c;
_21e[name]=_21c;
}
}
}
}
}
}
}
});
var _223=function(){
return this.__subclassesarray__;
};
var _224=(function(){
if(!Array.push){
return false;
}
var a=function(){
};
a.prototype=new Array;
var b=new a;
b.push(null);
return !!b.length;
})();
var _227,_228;
var type=this.type=function(){
};
type.__new__=function(_22a,name,base,dict){
var cls=Class.create();
cls.prototype=Class.getInstance(base);
cls.prototype.constructor=cls;
if(base.__subclassesarray__){
base.__subclassesarray__.push(cls);
}
var _22f=cls.prototype;
var _230=_22f.__properties__||{};
_22f.__properties__=object.extend({},_230);
if(base!==type){
for(var _231 in base){
if(_231.indexOf("__")!=0&&cls[_231]===undefined){
cls[_231]=base[_231];
}
}
}
cls.__new__=base.__new__;
cls.__metaclass__=base.__metaclass__;
cls.__mixin__("__this__",{mixining:null,base:cls.__base__,parent:function(){
var name=arguments.callee.caller.__name__;
return cls.__base__[name].apply(cls.__base__,arguments);
}});
cls.__mixin__(dict);
var _233=dict["__mixins__"]||dict["@mixins"];
if(_233){
cls.__mixins__=_233;
_233.forEach(function(_234){
Object.keys(_234.prototype).forEach(function(name){
if(["get","set","_set","initialize"].indexOf(name)!==-1||name.indexOf("__")==0){
return;
}
if(cls[name]!==undefined){
return;
}
var _236=_234.prototype[name];
if(typeof _236=="function"&&_236.__class__===_21f){
cls.__mixin__(name,_236.im_func);
}else{
cls.__mixin__(name,_236);
}
});
});
}
cls.__base__=base;
cls.__dict__=dict;
cls.prototype.get=_210;
cls.prototype.set=_213;
cls.prototype._set=_217;
return cls;
};
type.initialize=function(){
};
var _237=this.Class=function(){
var _238=arguments.length;
if(_238<1){
throw new Error("bad arguments");
}
var base=_238>1?arguments[0]:type;
if(base){
if(!_224){
if(base===Array){
base=_227;
}else{
if(base===String){
base=_228;
}
}
}
}
var dict=arguments[_238-1];
if(dict instanceof Function){
var f=dict;
dict={};
f.call(dict);
}
var _23c;
if(dict.__metaclass__){
_23c=dict.__metaclass__;
}else{
if(base.__metaclass__){
_23c=base.__metaclass__;
}else{
_23c=type;
}
}
var cls=_23c.__new__(_23c,null,base,dict);
_23c.initialize(cls,null,base,dict);
return cls;
};
_237.create=function(){
var cls=function(_23f){
if(_23f===PROTOTYPING){
return this;
}
this.__class__=cls;
_237.initMixins(cls,this);
var _240=this.initialize?this.initialize.apply(this,arguments):null;
return _240;
};
cls.__subclassesarray__=[];
cls.__subclasses__=_223;
cls.__mixin__=_21a;
return cls;
};
_237.initMixins=function(cls,_242){
var _243;
if(cls.__mixins__){
for(var i=0,l=cls.__mixins__.length;i<l;i++){
_243=cls.__mixins__[i];
if(_243.initialize){
_243.initialize(_242);
}
}
}
};
_237.mixin=function(dict,cls){
if(!dict.__mixins__){
dict.__mixins__=[];
}
dict.__mixins__.push(cls);
};
_237.hasProperty=function(obj,name){
return (name in obj.__properties__);
};
_237.getPropertyNames=function(obj){
return Object.keys(obj.__properties__);
};
_237.inject=function(cls,host,args){
if(!args){
args=[];
}
host.__class__=cls;
host.__properties__=cls.prototype.__properties__;
var p=_237.getInstance(cls);
object.extend(host,p);
args.unshift(host);
_237.initMixins(cls,host);
if(cls.initialize){
cls.initialize.apply(cls,args);
}
};
_237.getChain=function(cls){
var _250=[cls];
while(cls.__base__){
_250.push(cls.__base__);
cls=cls.__base__;
}
return _250;
};
_237.getInstance=function(cls){
if(cls===Array||cls===String){
return new cls;
}
return new cls(window.PROTOTYPING);
};
_237.getAllSubClasses=function(cls,_253){
if(!_253){
_253=[];
}else{
_253.push(cls);
}
var subs=cls.__subclassesarray__;
for(var i=0,l=subs.length;i<l;i++){
arguments.callee(subs[i],_253);
}
return _253;
};
var _21f=this.instancemethod=function(func){
var _258=function(){
var args=[].slice.call(arguments,0);
args.unshift(this);
return func.apply(this.__this__,args);
};
_258.__class__=arguments.callee;
_258.im_func=func;
return _258;
};
var _221=this.staticmethod=function(func){
var _25b=function(){
var cls=this.__this__?this:this.__class__;
return func.apply(cls.__this__,arguments);
};
_25b.__class__=arguments.callee;
_25b.im_func=func;
return _25b;
};
var _220=this.classmethod=function(func){
var _25e=function(){
var args=[].slice.call(arguments,0);
var cls=this.__this__?this:this.__class__;
args.unshift(cls);
return func.apply(cls.__this__,args);
};
_25e.__class__=arguments.callee;
_25e.im_func=func;
return _25e;
};
var _222=this.property=function(fget,fset){
var p=function(){
};
p.__class__=arguments.callee;
p.fget=fget;
p.fset=fset;
return p;
};
var _264=function(_265,_266){
var cls=new _237(function(){
for(var i=0,l=_266.length;i<l;i++){
this[_266[i]]=(function(name){
return function(){
return _265.prototype[name].apply(arguments[0],[].slice.call(arguments,1));
};
})(_266[i]);
}
});
return cls;
};
_227=_264(Array,["concat","indexOf","join","lastIndexOf","pop","push","reverse","shift","slice","sort","splice","toString","unshift","valueOf","forEach","some","every","map","filter","reduce","reduceRight"]);
_227.prototype.length=0;
_228=_264(String,["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]);
})();
(function(){
this.Loader=new Class(function(){
var _lib;
function Module(name){
this.__name__=name;
}
Module.prototype.toString=function(){
return "<module '"+this.__name__+"'>";
};
function NoModuleError(name){
this.message="no module named "+name;
}
NoModuleError.prototype=new Error();
this.scripts=document.getElementsByTagName("script");
this.initialize=function(self){
self.useCache=true;
self.lib={};
self.anonymousModuleCount=0;
_lib=self.lib;
self.add("sys",function(_26f){
});
};
this.loadLib=function(self){
var _271=self.scripts;
for(var i=0,_273,_274,l=_271.length;i<l;i++){
_273=_271[i];
_274=_273.getAttribute("data-module");
if(!_274){
continue;
}
if(_lib[_274]){
continue;
}
self.makePrefixPackage(_274);
_lib[_274]={file:_273.getAttribute("data-src"),name:_274};
}
};
this.makePrefixPackage=function(self,name){
var _278=name.split(".");
for(var i=0,_27a,l=_278.length-1;i<l;i++){
_27a=_278.slice(0,i+1).join(".");
if(_lib[_27a]==undefined){
_lib[_27a]={name:_27a};
}
}
};
this.loadScript=classmethod(function(cls,src,_27e,_27f){
_27f=!!_27f;
var ele;
if(_27f){
var _281=cls.scripts;
for(var i=0,_283,l=_281.length;i<l;i++){
_283=_281[i];
if(_283.src==src){
ele=_283;
if(_281[i].loading){
ele.callbacks.push(_27e);
}else{
_27e(ele);
}
return;
}
}
}
ele=document.createElement("script");
ele.type="text/javascript";
ele.src=src;
ele.async=true;
ele.loading=true;
ele.callbacks=[];
var _285=function(){
ele.loading=null;
ele.callbacks.forEach(function(_286){
_286(ele);
});
ele.callbacks=null;
};
ele.callbacks.push(_27e);
if(window.ActiveXObject){
ele.onreadystatechange=function(){
var rs=this.readyState;
if("loaded"===rs||"complete"===rs){
ele.onreadystatechange=null;
_285();
}
};
}else{
if(ele.addEventListener){
ele.addEventListener("load",_285,false);
ele.addEventListener("error",_285,false);
}else{
ele.onload=ele.onerror=_285;
}
}
document.getElementsByTagName("head")[0].insertBefore(ele,null);
});
this.executeModule=function(self,pkg,_28a,_28b,_28c,_28d){
if(!_28d){
_28d={};
}
var _28e=new Module(_28d.name||pkg.name);
if(_28e.__name__==="sys"){
_28e.modules=_28a;
}
var args=[_28e];
var done=function(){
if(pkg.fn){
var _291=pkg.fn.apply(_28e,args);
if(_291){
if(typeof _291==="object"||typeof _291==="function"){
_291.toString=Module.prototype.toString;
_291.__name__=_28e.__name__;
}
_28e=_291;
}
}
if(_28c){
_28c(_28e);
}
};
if(!pkg.fn&&pkg.file){
self.loadScript(pkg.file,function(){
loadNext(0);
},true);
return;
}else{
if(!pkg.fn||pkg.uses.length===0){
done();
return;
}
}
function loadNext(i){
var use=pkg.uses[i];
_28b.push(use);
if(_28b.indexOf(use)!=_28b.length-1){
var _294=new Error("circular dependencies. ["+_28b.join(",")+"]");
_294.stack=_28b;
throw _294;
}
self.getModule(use,_28a,_28b,function(){
_28b.pop();
var _295,root,_297;
_295=use.split(".");
root=_28a[_295[0]];
if(args.indexOf(root)==-1){
args.push(root);
}
if(i<pkg.uses.length-1){
loadNext(i+1);
}else{
if(i==pkg.uses.length-1){
done();
}
}
});
}
loadNext(0);
};
this.getModule=function(self,name,_29a,_29b,_29c){
var _29d=name.split(".");
function loadNext(i,_29f){
var _2a0=_29d.slice(0,i+1).join(".");
name=_29d[i];
var next=function(_2a2){
_29a[_2a0]=_2a2;
if(_29f){
_29a[_29f][name]=_29a[_2a0];
}
if(i<_29d.length-1){
loadNext(i+1,_2a0);
}else{
if(i==_29d.length-1){
_29c(_29a[_2a0]);
}
}
};
if(_29a[_2a0]){
next(_29a[_2a0]);
}else{
if(_lib[_2a0]){
var pkg=_lib[_2a0];
if(pkg.file){
self.loadScript(pkg.file,function(){
self.executeModule(pkg,_29a,_29b,next);
},true);
}else{
self.executeModule(pkg,_29a,_29b,next);
}
}else{
throw new NoModuleError(_2a0);
}
}
}
loadNext(0);
};
this.getUses=function(self,uses,_2a6){
if(typeof uses=="string"){
uses=uses.split(/\s*,\s*/ig);
}
uses=uses.filter(function(use){
return use!=_2a6;
});
return uses;
};
this.add=function(self,name,uses,_2ab){
if(_lib[name]&&_lib[name].fn){
return null;
}
if(typeof uses=="function"){
_2ab=uses;
uses=[];
}else{
uses=self.getUses(uses,name);
}
self.makePrefixPackage(name);
var pkg=_lib[name];
if(!pkg){
pkg=_lib[name]={};
}
pkg.name=name;
pkg.uses=uses;
pkg.fn=_2ab;
return pkg;
};
this.use=function(self,uses,_2af){
self.loadLib();
var name="__anonymous_"+self.anonymousModuleCount+"__";
self.anonymousModuleCount++;
var _2b1=self.add(name,uses,_2af);
self.executeModule(_2b1,{},[],function(_2b2){
for(var _2b3 in _2b2){
if(_2b3!="__name__"&&window[_2b3]===undefined){
window[_2b3]=_2b2[_2b3];
}
}
},{name:"__main__"});
};
this.execute=function(self,name){
self.loadLib();
var _2b6=_lib[name];
if(!_2b6){
throw new NoModuleError(name);
}
self.executeModule(_2b6,{},[],null,{name:"__main__"});
};
});
})();
object.bind(window);
object.add("ua",function(_2b7){
var _2b8=this.numberify=function(s){
var c=0;
return parseFloat(s.replace(/\./g,function(){
return (c++===0)?".":"";
}));
};
var o=this.ua={};
var ua=navigator.userAgent,m,m2;
var core,_2c0;
if((m=ua.match(/MSIE\s([^;]*)/))&&m[1]){
if((m2=ua.match(/Trident\/([\d.]*)/))&&m2[1]){
o[core="ie"]=document.documentMode;
o[_2c0="ieshell"]=_2b8(m2[1])+4;
}else{
o[_2c0="ieshell"]=o[core="ie"]=_2b8(m[1]);
}
}else{
if((m=ua.match(/AppleWebKit\/([\d.]*)/))&&m[1]){
o[core="webkit"]=_2b8(m[1]);
}else{
if((m=ua.match(/Gecko/))){
o[core="gecko"]=0;
if((m=ua.match(/rv:([\d.]*)/))&&m[1]){
o[core]=_2b8(m[1]);
}
}else{
if((m=ua.match(/Presto\/([\d.]*)/))&&m[1]){
o[core="presto"]=_2b8(m[1]);
}
}
}
if((m=ua.match(/Chrome\/([\d.]*)/))&&m[1]){
o[_2c0="chrome"]=_2b8(m[1]);
}else{
if((m=ua.match(/\/([\d.]*) Safari/))&&m[1]){
o[_2c0="safari"]=_2b8(m[1]);
}else{
if((m=ua.match(/Firefox\/([\d.]*)/))&&m[1]){
o[_2c0="firefox"]=_2b8(m[1]);
}else{
if((m=ua.match(/Opera\/([\d.]*)/))&&m[1]){
o[_2c0="opera"]=_2b8(m[1]);
if((m=ua.match(/Opera\/.* Version\/([\d.]*)/))&&m[1]){
o[_2c0]=_2b8(m[1]);
}
}
}
}
}
}
o.shell=_2c0;
o.core=core;
});
object.add("string",function(_2c1){
this.substitute=function(){
return Mustache.to_html.apply(null,arguments);
};
this.camelCase=function(str){
return str.replace(/-\D/g,function(_2c3){
return _2c3.charAt(1).toUpperCase();
});
};
this.hyphenate=function(str){
return str.replace(/[A-Z]/g,function(_2c5){
return ("-"+_2c5.charAt(0).toLowerCase());
});
};
this.capitalize=function(str){
return str.replace(/\b[a-z]/g,function(_2c7){
return _2c7.toUpperCase();
});
};
this.trim=function(str){
return (str||"").replace(/^\s+|\s+$/g,"");
};
this.ltrim=function(str){
return (str||"").replace(/^\s+/,"");
};
this.rtrim=function(str){
return (str||"").replace(/\s+$/,"");
};
this.lengthZh=function(str){
return str.length;
};
this.toQueryString=function(_2cc){
var _2cd=[];
for(var key in _2cc){
var _2cf=_2cc[key];
var _2d0;
if(_2cf&&_2cf.constructor===Array){
var qs={};
_2cf.forEach(function(val,i){
qs[i]=val;
});
_2d0=arguments.callee(qs,key);
}else{
if(typeof _2cf=="object"){
_2d0=arguments.callee(_2cf,key);
}else{
_2d0=key+"="+encodeURIComponent(_2cf);
}
}
if(_2cf!==null){
_2cd.push(_2d0);
}
}
return _2cd.join("&");
};
});
object.add("events","ua",function(_2d4,ua){
function IEEvent(){
}
IEEvent.prototype.stopPropagation=function(){
this.cancelBubble=true;
};
IEEvent.prototype.preventDefault=function(){
this.returnValue=false;
};
IEEvent.prototype.getPreventDefault=function(){
return this.returnValue===false;
};
IEEvent.prototype.stop=function(){
this.stopPropagation();
this.preventDefault();
};
this.fireevent=function(arg1){
var name,func,_2d9;
var _2da=function(self){
var _2dc=Function.__get_name__(arguments.callee)||arguments.callee.__name__;
if(!name){
name=_2dc;
}
var _2dd={};
var args=Array.prototype.slice.call(arguments,1);
if(_2d9){
for(var i=0;i<_2d9.length;i++){
_2dd[_2d9[i]]=arguments[i+1];
}
}
_2dd._args=args;
var _2e0=self.fireEvent(name,_2dd,self);
var _2e1=self[_2dc+"_createEvent"];
if(_2e1){
args.unshift(_2e0);
_2e1.apply(self,args);
}
var _2e2=_2e0.getPreventDefault?_2e0.getPreventDefault():_2e0.defaultPrevented;
if(!_2e2){
func.apply(this,arguments);
}
return _2e0;
};
if(typeof arg1=="function"){
func=arg1;
return _2da;
}else{
if(Array.isArray(arguments[0])){
_2d9=arguments[0];
}else{
name=arg1;
if(arguments[1]){
_2d9=arguments[1];
}
}
return function(_2e3){
func=_2e3;
return _2da;
};
}
};
this.wrapEvent=function(e){
e.target=e.srcElement;
e.stopPropagation=IEEvent.prototype.stopPropagation;
e.preventDefault=IEEvent.prototype.preventDefault;
e.getPreventDefault=IEEvent.prototype.getPreventDefault;
e.stop=IEEvent.prototype.stop;
return e;
};
this.Events=new Class(function(){
this.__addEvent=function(self,type,func,cap){
var _2e9="_event_"+type;
if(self[_2e9]===undefined){
self[_2e9]=0;
}
self.attachEvent("onpropertychange",function(_2ea){
if(_2ea.propertyName==_2e9){
func();
}
});
};
this.initialize=function(self){
if(!self.addEventListener){
self._eventListeners={};
}
if(!self.addEventListener&&!self.attachEvent){
self.__boss=document.createElement("div");
}
};
this.addEvent=document.addEventListener?function(self,type,func,cap){
var boss=self.__boss||self;
if(cap===null){
cap=false;
}
if(!ua.ua.ie&&type=="mouseleave"){
var _2f1=function(_2f2,_2f3){
var p=_2f2.relatedTarget;
while(p&&p!=_2f3){
try{
p=p.parentNode;
}
catch(error){
p=_2f3;
}
}
return p!==_2f3;
};
var _2f5=func;
func=function(_2f6){
var p=_2f6.relatedTarget;
while(p&&p!=self){
try{
p=p.parentNode;
}
catch(e){
p=self;
}
}
if(p!==self&&_2f5){
_2f5.call(self,_2f6);
}
};
func.innerFunc=_2f5;
type="mouseout";
}
boss.addEventListener(type,func,cap);
}:function(self,type,func){
var boss=self.__boss||self;
if(!self._eventListeners[type]){
self._eventListeners[type]=[];
}
var _2fc=self._eventListeners[type];
if(_2fc.some(function(f){
return f.innerFunc===func;
})){
return;
}
var _2fe=function(_2ff){
var e=arguments.length>1?_2ff:_2d4.wrapEvent(window.event);
func.call(self,e);
};
_2fe.innerFunc=func;
_2fc.push(_2fe);
boss.attachEvent("on"+type,_2fe);
};
this.removeEvent=document.removeEventListener?function(self,type,func,cap){
var boss=self.__boss||self;
boss.removeEventListener(type,func,cap);
}:function(self,type,func,cap){
var boss=self.__boss||self;
if(!self._eventListeners){
self._eventListeners={};
}
var _30b=self._eventListeners[type];
if(!_30b){
return;
}
for(var i=0,_30d;i<_30b.length;i++){
_30d=_30b[i];
if(_30d===func||_30d.innerFunc===func){
_30b.splice(i,1);
break;
}
}
if(_30d){
boss.detachEvent("on"+type,_30d);
}
};
this.fireEvent=document.dispatchEvent?function(self,type,_310){
var boss=self.__boss||self;
var _312="on"+type.toLowerCase();
var _313=document.createEvent("Event");
_313.initEvent(type,false,true);
extend(_313,_310);
if(self[_312]){
var _314=self[_312].call(self,_313);
if(_314===false){
_313.preventDefault();
}
}
boss.dispatchEvent(_313);
return _313;
}:function(self,type,_317){
if(!_317){
_317={};
}
var _318="on"+type.toLowerCase();
var _319=_2d4.wrapEvent(_317);
if(self[_318]){
var _31a=self[_318].call(self,_319);
if(_31a===false){
_319.preventDefault();
}
}
if(!self._eventListeners[type]){
return _319;
}
var _31b=self._eventListeners[type];
for(var i=0,j=_31b.length;i<j;i++){
if(_31b[i]){
_31b[i].call(self,_319,true);
}
}
return _319;
};
});
});
object.add("options",function(_31e){
var _31f=true;
for(var i in {toString:1}){
_31f=null;
}
if(_31f){
_31f=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];
}
this.overloadsetter=function(func){
return function(){
var a=arguments[func.length-2]||null;
var b=arguments[func.length-1];
var _324=args=Array.prototype.slice.call(arguments,0,func.length-2);
if(a===null){
return this;
}
if(typeof a!="string"){
for(var k in a){
args=_324.slice(0);
args.push(k);
args.push(a[k]);
func.apply(this,args);
}
if(_31f){
for(var i=_31f.length;i>0;i--){
k=_31f[i];
if(a.hasOwnProperty(k)){
func.call(this,k,a[k]);
}
}
}
}else{
args.push(a);
args.push(b);
func.apply(this,args);
}
return this;
};
};
this.Arguments=new Class(function(){
this.initialize=function(self,_328,opts){
if(opts==undefined){
opts={};
}
var _32a={};
for(var key in _328){
_32a[key]=(opts[key]!=undefined?opts[key]:_328[key]);
}
return _32a;
};
});
this.Options=new Class({initialize:function(self,_32d){
if(_32d){
self._provider=_32d;
}
self._options={};
},setOptions:function(self,_32f,host){
if(!host){
host=self._options;
}
for(var i in _32f){
if(host[i]!==undefined){
host[i]=_32f[i];
}
}
},setOption:function(self,name,type,_335){
if(_335!==undefined){
self._options[name]=_335;
}else{
_335=self._provider.makeOption(name,type);
if(_335===null){
return;
}else{
self._options[name]=_335;
}
}
},getOptions:function(self){
return self._options;
}});
});
object.add("dom","ua, events, string, sys",function(_337,ua,_339,_33a,sys){
window.UID=1;
var _33c={};
var get=function(uid){
return (_33c[uid]||(_33c[uid]={}));
};
var $uid=this.$uid=(window.ActiveXObject)?function(item){
return (item.uid||(item.uid=[window.UID++]))[0];
}:function(item){
return item.uid||(item.uid=window.UID++);
};
$uid(window);
$uid(document);
function runHooks(){
window.__domloadHooks.forEach(function(f,i){
try{
f();
}
catch(e){
throw e;
}
});
window.__domloadHooks=[];
}
if(!window.__domloadHooks){
window.__domloadHooks=[];
var _344=null;
if(ua.ua.webkit&&ua.ua.webkit<525){
_344=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
clearInterval(_344);
runHooks();
}
},10);
}else{
if(ua.ua.ie){
_344=setInterval(function(){
try{
document.body.doScroll("left");
clearInterval(_344);
runHooks();
}
catch(e){
}
},20);
}
}
}
this.ready=function(_345){
if(document.body){
_345();
}else{
if((ua.ua.webkit&&ua.ua.webkit<525)||!document.addEventListener){
window.__domloadHooks.push(_345);
}
if(document.addEventListener){
document.addEventListener("DOMContentLoaded",_345,false);
}
}
};
var wrap=this.wrap=function(node){
if(!node){
return null;
}
if(Array.isArray(node)){
return new _348(node);
}else{
if(node._wrapped){
return node;
}
var _349;
if(node===window){
_349=_34a;
}else{
if(node===window.document){
_349=_34b;
}else{
if(node.nodeType===1){
_349=getWrapper(node.tagName);
}else{
return node;
}
}
}
node._wrapped=true;
$uid(node);
Class.inject(_349,node);
return node;
}
};
var _34c=this.getElements=function(_34d,_34e){
if(!_34e){
_34e=document;
}
var _34f=Slick.parse(_34d);
var eles=Sizzle(_34d,_34e);
var _351,part;
if(_34f.expressions.length==1){
part=_34f.expressions[0];
_351=getWrapper(part[part.length-1].tag);
}else{
for(var i=0,_354,_355;i<_34f.expressions.length;i++){
part=_34f.expressions[i];
_351=getWrapper(part[part.length-1].tag);
_354=Class.getChain(_351).slice(0,-1).reverse();
if(_355){
_354=getCommon(_354,_355);
}
if(_354.length==1){
break;
}
_355=_354;
}
_351=_354[_354.length-1];
}
return new _348(eles,_351);
};
var _356=this.getElement=function(_357,_358){
if(!_358){
_358=document;
}
var ele=Sizzle(_357,_358)[0];
ele=wrap(ele);
return ele;
};
this.id=function(id){
return _337.wrap(document.getElementById(id));
};
var _35b=this.eval_inner_JS=function(ele){
var js=[];
if(ele.nodeType==11){
for(var i=0;i<ele.childNodes.length;i++){
if(ele.childNodes[i].nodeType===1){
js=js.concat(ele.childNodes[i].getElementsByTagName("script"));
}
}
}else{
if(ele.nodeType==1){
js=ele.getElementsByTagName("script");
}
}
var arr=[];
for(i=0;i<js.length;i++){
arr.push(js[i]);
}
arr.forEach(function(s,i){
if(s.src){
return;
}else{
var _362="__inner_js_out_put = [];\n";
_362+=s.innerHTML.replace(/document\.write/g,"__inner_js_out_put.push");
eval(_362);
if(__inner_js_out_put.length!==0){
var tmp=document.createDocumentFragment();
$(tmp).appendHTML(__inner_js_out_put.join(""));
s.parentNode.insertBefore(tmp,s);
}
}
});
};
var _364=(function(){
var t=document.createElement("div");
t.innerHTML="<TEST_TAG></TEST_TAG>";
return (t.firstChild===null);
})();
this.getDom=function(str){
var tmp=document.createElement("div");
var _368=document.createDocumentFragment();
if(_364){
tmp.style.display="none";
document.body.appendChild(tmp);
}
tmp.innerHTML=str;
while(tmp.firstChild){
_368.appendChild(wrap(tmp.firstChild));
}
if(_364){
tmp.parentNode.removeChild(tmp);
}
return _368;
};
var _369=this.ElementClassList=new Class(Array,function(){
this.initialize=function(self,ele){
self.length=0;
self._ele=ele;
self._loadClasses();
};
this._loadClasses=function(self){
self._classes=self._ele.className.replace(/^\s+|\s+$/g,"").split(/\s+/);
};
this.toggle=function(self,_36e){
if(self.contains(_36e)){
self.remove(_36e);
}else{
self.add(_36e);
}
};
this.add=function(self,_370){
if(!self.contains(_370)){
self._ele.className+=(" "+_370);
}
};
this.remove=function(self,_372){
self._ele.className=self._ele.className.replace(new RegExp(_372,"i"),"");
};
this.contains=function(self,_374){
self._loadClasses();
if(self._classes.indexOf(_374)!=-1){
return true;
}else{
return false;
}
};
this.item=function(self,i){
return self._classes[i]||null;
};
this.toString=function(self){
return self._ele.className;
};
});
var _378=this.Element=new Class(function(){
Class.mixin(this,_339.Events);
this.initialize=function(self,_37a){
if(_37a){
self=document.createElement(_37a);
wrap(self);
}else{
}
self._eventListeners={};
if(self.classList===undefined&&self!==document&&self!==window){
self.classList=new _369(self);
}
};
this.retrieve=function(self,_37c,dflt){
var _37e=get(self.uid),prop=_37e[_37c];
if(dflt!==null&&prop===null){
prop=_37e[_37c]=dflt;
}
return prop!==null?prop:null;
};
this.store=function(self,_381,_382){
var _383=get(self.uid);
_383[_381]=_382;
return self;
};
this.delegate=function(self,_385,type,_387){
self.addEvent(type,function(e){
var ele=e.srcElement||e.target;
do{
if(ele&&_378.matchesSelector(ele,_385)){
_387.call(wrap(ele),e);
}
}while((ele=ele.parentNode));
});
};
this.matchesSelector=function(self,_38b){
return Sizzle.matches(_38b,[self]).length>0;
};
this.getData=function(self,name){
return self.getAttribute("data-"+name);
};
this.setHTML=function(self,str){
self.set("innerHTML",str);
};
this.setContent=this.setHTML;
this.getElement=function(self,_391){
return _356(_391,self);
};
this.getElements=function(self,_393){
return _34c(_393,self);
};
var _394={before:function(_395,_396){
var _397=_396.parentNode;
if(_397){
_397.insertBefore(_395,_396);
}
},after:function(_398,_399){
var _39a=_399.parentNode;
if(_39a){
_39a.insertBefore(_398,_399.nextSibling);
}
},bottom:function(_39b,_39c){
_39c.appendChild(_39b);
},top:function(_39d,_39e){
_39e.insertBefore(_39d,_39e.firstChild);
}};
_394.inside=_394.bottom;
this.grab=function(self,el,_3a1){
_394[_3a1||"bottom"](el,self);
return self;
};
this.inject=function(self,el,_3a4){
_394[_3a4||"bottom"](self,el);
return self;
};
this.getPrevious=function(self){
};
this.getAllPrevious=function(self){
};
this.getNext=function(self){
};
this.getAllNext=function(self){
};
this.getFirst=function(self){
};
this.getLast=function(self){
};
this.getParent=function(self,_3ac){
if(!_3ac){
return wrap(self.parentNode);
}
var _3ad=self;
do{
if(_378.matchesSelector(_3ad,_3ac)){
return wrap(_3ad);
}
}while((_3ad=_3ad.parentNode));
return null;
};
this.getParents=function(self){
};
this.getSiblings=function(self){
};
this.getChildren=function(self){
};
this.addClass=function(self,name){
self.classList.add(name);
};
this.removeClass=function(self,name){
self.classList.remove(name);
};
this.toggleClass=function(self,name){
self.classList.toggle(name);
};
this.hasClass=function(self,name){
return self.classList.contains(name);
};
this.setStyle=function(self,_3ba,_3bb){
switch(_3ba){
case "opacity":
return self.set("opacity",parseFloat(_3bb));
case "float":
_3ba=floatName;
break;
default:
break;
}
_3ba=_33a.camelCase(_3ba);
self.style[_3ba]=_3bb;
return null;
};
this.dispose=function(self){
return (self.parentNode)?self.parentNode.removeChild(self):self;
};
this.hide=function(self){
if(self.style.display!=="none"){
self.oldDisplay=self.style.display;
}
self.style.display="none";
};
this.show=function(self){
self.style.display=self.oldDisplay||"";
};
this.toggle=function(self){
if(self.style.display=="none"){
self.show();
}else{
self.hide();
}
};
this.innerHTML=property(null,function(self,html){
if(_364){
var _3c2=_337.getDom(html);
self.innerHTML="";
while(_3c2.firstChild){
self.appendChild(_3c2.firstChild);
}
}else{
self.innerHTML=html;
}
});
this.tagName=property(function(self){
return self.tagName.toUpperCase();
});
this.fromString=staticmethod(function(str){
var tmp=document.createElement("div");
if(_364){
tmp.style.display="none";
document.body.appendChild(tmp);
}
tmp.innerHTML=str.trim();
var _3c6=wrap(tmp.firstChild);
if(_364){
tmp.parentNode.removeChild(tmp);
}
return _3c6;
});
});
this.ImageElement=new Class(_378,function(){
var _3c7="naturalWidth" in document.createElement("img");
function _getNaturalSize(img){
var _3c9=img.runtimeStyle;
var old={w:_3c9.width,h:_3c9.height};
_3c9.width=_3c9.height="auto";
var w=img.width;
var h=img.height;
_3c9.width=old.w;
_3c9.height=old.h;
return {width:w,height:h};
}
this.naturalWidth=property(function(self){
if(_3c7){
return self.naturalWidth;
}else{
return _getNaturalSize(self).width;
}
});
this.naturalHeight=property(function(self){
if(_3c7){
return self.naturalHeight;
}else{
return _getNaturalSize(self).height;
}
});
});
this.FormElement=new Class(_378,function(){
this.initialize=function(self){
_378.initialize(self);
if(self.elements){
for(var i=0;i<self.elements.length;i++){
wrap(self.elements[i]);
}
}
};
this.send=function(self,_3d2){
if(!_3d2){
_3d2=self.toQueryString();
}
var net=sys.modules["net"];
if(net){
xhr=new net.Request({onsuccess:function(_3d4){
self.fireEvent("requestSuccess",{request:_3d4.request});
},onerror:function(_3d5){
self.fireEvent("requestError",{request:_3d5.request});
}});
}else{
throw new ModuleRequiredError("net");
}
xhr.method=self.method;
xhr.url=self.action;
xhr.send(_3d2);
};
this.toQueryString=function(self){
var _3d7=[];
function addItem(name,_3d9){
if(typeof _3d9!="undefined"){
_3d7.push(encodeURIComponent(name)+"="+encodeURIComponent(_3d9));
}
}
self.getElements("input, select, textarea, output").forEach(function(el){
var type=el.type;
if(!el.name||el.disabled||type=="submit"||type=="reset"||type=="file"||type=="image"){
return;
}
if(el.tagName.toLowerCase()=="select"){
el.getSelected().map(function(opt){
var _3dd=wrap(opt).get("value");
addItem(el.name,_3dd);
});
}else{
if(type=="radio"||type=="checkbox"){
if(el.checked){
addItem(el.name,el.get("value"));
}
}else{
addItem(el.name,el.get("value"));
}
}
});
return _3d7.join("&");
};
this.checkValidity=function(self){
return self.getElements("input, select, textarea, output").every(function(el){
return el.checkValidity();
});
};
});
this.FormItemElement=new Class(_378,function(){
var _3e0=(function(){
return !("placeholder" in document.createElement("input"));
})();
var _3e1=(function(){
return ("checkValidity" in document.createElement("input"));
})();
this.initialize=function(self){
_378.initialize(self);
if(_3e0&&["INPUT","TEXTAREA"].indexOf(self.get("tagName"))!==-1){
self.bindPlaceholder(self);
}
};
this.selectionStart=property(function(self){
if(typeof self.selectionStart=="number"){
return self.selectionStart;
}else{
if(document.selection){
self.focus();
var _3e4=document.selection.createRange();
var _3e5=0;
if(_3e4.parentElement()==self){
var _3e6=document.body.createTextRange();
_3e6.moveToElementText(self);
for(_3e5=0;_3e6.compareEndPoints("StartToStart",_3e4)<0;_3e5++){
_3e6.moveStart("character",1);
}
for(var i=0;i<=_3e5;i++){
if(self.get("value").charAt(i)=="\n"){
_3e5++;
}
}
}
return _3e5;
}
}
});
this.selectionEnd=property(function(self){
if(typeof self.selectionEnd=="number"){
return self.selectionEnd;
}else{
if(document.selection){
self.focus();
var _3e9=document.selection.createRange();
var end=0;
if(_3e9.parentElement()==self){
var _3eb=document.body.createTextRange();
_3eb.moveToElementText(self);
for(end=0;_3eb.compareEndPoints("StartToEnd",_3e9)<0;end++){
_3eb.moveStart("character",1);
}
for(var i=0;i<=end;i++){
if(self.get("value").charAt(i)=="\n"){
end++;
}
}
}
return end;
}
}
});
this.getSelected=function(self){
self.selectedIndex;
var _3ee=[];
for(var i=0;i<self.options.length;i++){
if(self.options[i].selected){
_3ee.push(self.options[i]);
}
}
return _3ee;
};
this.value=property(function(self){
if(self.classList.contains("placeholder")){
return "";
}
return self.value;
},function(self,_3f2){
if(self.classList.contains("placeholder")){
self.classList.remove("placeholder");
self.removeAttribute("autocomplete");
self.value="";
}
self.value=_3f2;
if(_3e0&&!self.value&&self.getAttribute("placeholder")){
self.classList.add("placeholder");
self.value=self.getAttribute("placeholder");
self.setAttribute("autocomplete","off");
}
self.checkValidity();
});
if(!_3e1){
this.validity=property(function(self){
var _3f4=self.get("value");
var _3f5={valueMissing:self.getAttribute("required")&&!_3f4?true:false,typeMismatch:(function(type){
if(type=="url"){
return !(/^\s*(?:(\w+?)\:\/\/([\w-_.]+(?::\d+)?))(.*?)?(?:;(.*?))?(?:\?(.*?))?(?:\#(\w*))?$/i).test(_3f4);
}
if(type=="tel"){
return !(/[^\r\n]/i).test(_3f4);
}
if(type=="email"){
return !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i).test(_3f4);
}
return false;
})(self.getAttribute("type")),patternMismatch:(function(){
var _3f7=self.getAttribute("pattern");
if(_3f7){
return !(new RegExp("^"+_3f7+"$")).test(_3f4);
}else{
return false;
}
})(),tooLong:(function(){
var _3f8=self.getAttribute("maxlength");
var n=Number(_3f8);
if(n!=_3f8){
return false;
}
return _3f4.length>n;
})(),customError:!!self.__customValidity,rangeUnderflow:false,rangeOverflow:false,stepMismatch:false};
_3f5.valid=["valueMissing","typeMismatch","patternMismatch","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"].every(function(name){
return _3f5[name]===false;
});
self.__validationMessage=(function(){
if(_3f5.valid){
return "";
}
if(_3f5.customError){
return self.__customValidity;
}
if(_3f5.valueMissing){
return "\u8bf7\u586b\u5199\u6b64\u5b57\u6bb5\u3002";
}
if(_3f5.typeMismatch){
return "\u8bf7\u8f93\u5165\u4e00\u4e2a"+self.getAttribute("type")+"\u3002";
}
if(_3f5.patternMismatch){
return "\u8bf7\u5339\u914d\u8981\u6c42\u7684\u683c\u5f0f\u3002";
}
if(_3f5.tooLong){
return "\u8bf7\u5c06\u8be5\u6587\u672c\u51cf\u5c11\u4e3a "+self.getAttribute("maxlength")+" \u4e2a\u5b57\u7b26\u6216\u66f4\u5c11\uff08\u60a8\u5f53\u524d\u4f7f\u7528\u4e86"+self.get("value").length+"\u4e2a\u5b57\u7b26\uff09\u3002";
}
if(_3f5.rangeUnderflow){
return "\u503c\u5fc5\u987b\u5927\u4e8e\u6216\u7b49\u4e8e"+self.getAttribute("min")+"\u3002";
}
if(_3f5.rangeOverflow){
return "\u503c\u5fc5\u987b\u5c0f\u4e8e\u6216\u7b49\u4e8e"+self.getAttribute("max")+"\u3002";
}
if(_3f5.stepMismatch){
return "\u503c\u65e0\u6548\u3002";
}
})();
self._set("validationMessage",self.__validationMessage);
self._set("validity",_3f5);
return _3f5;
});
this.validationMessage=property(function(self){
self.get("validity");
return self.__validationMessage;
});
this.setCustomValidity=function(self,_3fd){
self.__customValidity=_3fd;
self.get("validity");
};
this.checkValidity=function(self){
self.get("validity");
return self.validity.valid;
};
}else{
this.validity=property(function(self){
return self.validity;
});
this.validationMessage=property(function(self){
return self.validationMessage;
});
}
this.focusToPosition=function(self,_402){
if(_402===undefined){
_402=self.get("value").length;
}
if(self.setSelectionRange){
self.focus();
self.setSelectionRange(self.get("value").length,_402);
}else{
if(self.createTextRange){
var _403=self.createTextRange();
_403.moveStart("character",_402);
_403.collapse(true);
_403.select();
self.focus();
}else{
self.focus();
}
}
};
this.bindPlaceholder=staticmethod(function(_404){
function checkEmpty(_405,_406){
var _407=_405.getAttribute("placeholder");
if(!_407){
return;
}
if(_405.classList.contains("placeholder")){
if(_406.type=="focus"&&_405.value===_407){
_405.value="";
}
_405.classList.remove("placeholder");
_405.removeAttribute("autocomplete");
}else{
if(!_405.value||((ua.ua.ie==6||ua.ua.ie==7)&&!_406&&_405.value==_407)){
_405.classList.add("placeholder");
_405.value=_407;
_405.setAttribute("autocomplete","off");
}
}
}
_404.addEvent("focus",function(_408){
return checkEmpty(_408.target,_408);
});
_404.addEvent("blur",function(_409){
return checkEmpty(_409.target,_409);
});
if(_404.form){
wrap(_404.form).addEvent("submit",function(){
if(_404.classList.contains("placeholder")){
_404.value="";
}
});
}
checkEmpty(_404);
});
});
var _34a=this.Window=new Class(_378,function(){
});
var _34b=this.Document=new Class(_378,function(){
});
var _348=this.Elements=new Class(Array,function(){
this.initialize=function(self,_40b,_40c){
if(!_40c){
_40c=_378;
}
for(var i=0;i<_40b.length;i++){
self.push(wrap(_40b[i]));
}
Object.keys(_40c).forEach(function(name){
self[name]=function(){
var _40f;
for(var i=0;i<self.length;i++){
_40f=self[i];
if(typeof _40f[name]=="function"){
_40f[name].apply(self[i],[].slice.call(arguments,0));
}
}
};
});
self.set=function(key,_412){
for(var i=0;i<self.length;i++){
self[i].set(key,_412);
}
};
self.get=function(key){
var _415=[];
for(var i=0;i<self.length;i++){
_415.push(self[i].get(key));
}
return _415;
};
};
});
var _417={"IMG":_337.ImageElement,"FORM":_337.FormElement,"INPUT":_337.FormItemElement,"TEXTAREA":_337.FormItemElement,"OUTPUT":_337.FormItemElement,"SELECT":_337.FormItemElement,"OPTION":_337.FormItemElement,"BUTTON":_337.FormItemElement};
function getWrapper(_418){
var tag=_418.toUpperCase();
var cls=_417[tag];
if(cls){
return cls;
}else{
return _378;
}
}
function getCommon(arr1,arr2){
var i;
for(i=0,l=arr1.length;i<l;i++){
if(!arr2[i]||arr2[i]!==arr1[i]){
break;
}
}
return arr1.slice(0,i);
}
});
object.add("net","dom, events",function(_41e,dom,_420){
var _421=this.ajaxProxies={};
this.ajaxRequest=function(url,_423){
var tmpA=document.createElement("a");
tmpA.href=url;
var _425=tmpA.hostname;
if(_425&&(_425!=location.hostname)){
var xhr=null;
if(_421[_425]){
_423(_421[_425].getTransport());
}else{
var _427=document.createElement("iframe");
_427.style.display="none";
dom.ready(function(){
document.body.insertBefore(_427,document.body.firstChild);
_427.src="http://"+_425+"/ajaxproxy.htm";
if(_427.attachEvent){
_427.attachEvent("onload",function(){
_423(_427.contentWindow.getTransport());
_421[_425]=_427.contentWindow;
});
}else{
_427.onload=function(){
_423(_427.contentWindow.getTransport());
_421[_425]=_427.contentWindow;
};
}
});
}
}else{
if(window.ActiveXObject){
try{
_423(new ActiveXObject("Msxml2.XMLHTTP"));
}
catch(e){
_423(new ActiveXObject("Microsoft.XMLHTTP"));
}
}else{
_423(new XMLHttpRequest());
}
}
};
this.ping=function(url){
var n="_net_ping_"+(new Date()).getTime();
var c=window[n]=new Image();
c.onload=(c.onerror=function(){
window[n]=null;
});
c.src=url;
c=null;
};
this.Request=new Class(function(){
Class.mixin(this,_420.Events);
this.initialize=function(self,_42c){
self.url=_42c.url||"";
self.method=_42c.method||"get";
self.headers={};
self._xhr=null;
self.onSuccess=_42c.onSuccess;
self.onsuccess=_42c.onsuccess;
self.onerror=_42c.onerror;
self.oncomplete=_42c.oncomplete;
};
this.send=function(self,_42e){
_41e.ajaxRequest(self.url,function(xhr){
self._xhr=xhr;
var _430={request:xhr};
xhr.onreadystatechange=function(){
var xhr=self._xhr;
if(xhr.readyState===4){
_430.responseText=xhr.responseText;
_430.responseXML=xhr.responseXML;
if(xhr.status===undefined||xhr.status===0||(xhr.status>=200&&xhr.status<300)){
self.fireEvent("success",_430);
if(self.onSuccess){
self.onSuccess(_430);
}
}else{
self.fireEvent("error",_430);
}
self.fireEvent("complete",_430);
}
};
var xhr=self._xhr;
var url=self.url;
if(_42e&&self.method=="get"){
url+=(url.indexOf("?")!=-1?"&":"?")+_42e;
_42e=null;
}
xhr.open(self.method,url,true);
xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
for(var name in self.headers){
xhr.setRequestHeader(name,self.headers[name]);
}
self._xhr.send(_42e);
});
};
this.setHeader=function(self,name,_436){
self.headers[name]=_436;
};
});
});
object.add("mvc","events",function(_437,_438){
var _439=this.Action=new Class(_438.Events,function(){
this.initialize=function(self){
_438.Events.initialize(self);
self.view=null;
};
this.execute=function(self,view){
self.view=view;
view.load(self);
};
});
});
object.add("ui","string, options, dom, events",function(_43d,_43e,_43f,dom,_441){
var _442=new Class(function(){
Object.keys(dom.Element).forEach(function(name){
if(typeof dom.Element[name]==="function"){
if(["initialize"].indexOf(name)!=-1){
return;
}
this[name]=function(self){
var args=[self._node];
var arg;
for(var i=1;i<arguments.length;i++){
arg=arguments[i];
args.push((arg&&arg._node)?arg._node:arg);
}
return dom.Element[name].apply(dom.Element,args);
};
}
},this);
});
this.Components=new Class(Array,function(){
this.initialize=function(self,_449,type,_44b){
if(!type){
type=_43d.Component;
}
for(var i=0;i<_449.length;i++){
self.push(new type(_449[i],_44b));
}
Object.keys(type).forEach(function(name){
self[name]=function(){
var _44e;
for(i=0;i<self.length;i++){
_44e=self[i];
if(typeof _44e[name]=="function"){
_44e[name].apply(self[i],arguments);
}
}
};
});
self.set=function(key,_450){
for(var i=0;i<self.length;i++){
self[i].set(key,_450);
}
};
self.get=function(key){
var _453=[];
for(var i=0;i<self.length;i++){
_453.push(self[i].get(key));
}
return _453;
};
};
});
this.define=function(_455,type,_457){
var prop=property(function(self){
return self[prop.__name__];
});
prop.isComponent=true;
prop.selector=_455;
prop.type=type||_43d.Component;
prop.single=_457;
return prop;
};
this.define1=function(_45a,type){
return _43d.define(_45a,type,1);
};
this.option=function(_45c){
var prop;
function fget(self){
return self.getOption(prop.__name__);
}
function fset(self,_460){
return self.setOption(prop.__name__,_460);
}
prop=property(fget,fset);
prop.defaultValue=_45c;
return prop;
};
this.__component=new Class(function(){
this.__new__=function(cls,name,base,dict){
if(dict.__metaclass__){
dict.__defaultOptions=[];
dict.__subs=[];
dict.__subEvents={};
dict.__onEvents=[];
dict.__handles=["init","reset","invalid","error"];
dict.__methods=[];
}else{
dict.__defaultOptions=[];
dict.__subs=[];
dict.__subEvents={};
dict.__onEvents=[];
dict.__handles=[];
dict.__methods=[];
Object.keys(dict).forEach(function(name){
if(name=="initialize"||name.indexOf("__")==0){
return;
}
var _466=dict[name];
if(_466!=null&&_466.__class__===property){
if(_466.isComponent){
dict.__subs.push(name);
}else{
dict.__defaultOptions.push(name);
}
}else{
if(typeof _466=="function"){
if(name.match(/^(_?[a-zA-Z]+)_([a-zA-Z]+)$/)){
(dict.__subEvents[RegExp.$1]=dict.__subEvents[RegExp.$1]||[]).push(RegExp.$2);
}else{
if(name.match(/^on([a-zA-Z]+)$/)){
dict.__onEvents.push(RegExp.$1);
}else{
if(name.slice(0,1)=="_"&&name.slice(0,2)!="__"&&name!="_set"){
dict.__handles.push(name.slice(1));
}else{
dict.__methods.push(name);
}
}
}
}
}
});
}
return type.__new__(cls,name,base,dict);
};
this.initialize=function(cls,name,base,dict){
cls.__handles.forEach(function(_46b){
cls.__mixin__(_46b,_441.fireevent(function(){
cls["_"+_46b].apply(cls,arguments);
}));
});
if(base&&base.addons){
cls.addons.push.apply(cls.addons,base.addons);
}
if(cls.addons){
cls.addons.forEach(function(comp){
comp.__defaultOptions.forEach(function(name){
var _46e=cls.__defaultOptions;
if(_46e.indexOf(name)!=-1){
return;
}
_46e.push(name);
cls.__mixin__(name,comp[name]);
});
comp.__subs.forEach(function(name){
var subs=cls.__subs;
if(subs.indexOf(name)!=-1){
return;
}
subs.push(name);
cls.__mixin__(name,comp[name]);
});
comp.__handles.forEach(function(_471){
var _472=cls.__handles;
var _473="_"+_471;
if(_472.indexOf(_471)!=-1){
return;
}
_472.push(_471);
cls.__mixin__(_471,comp.prototype[_471].im_func);
cls.__mixin__(_473,comp.prototype[_473].im_func);
});
comp.__methods.forEach(function(name){
var _475=cls.__methods;
if(_475.indexOf(name)!=-1){
return;
}
_475.push(name);
cls.__mixin__(name,comp.prototype[name].im_func);
});
});
}
if(base&&base!==type){
base.__defaultOptions.forEach(function(name){
var _477=cls.__defaultOptions;
if(_477.indexOf(name)==-1){
_477.push(name);
}
});
base.__subs.forEach(function(name){
var subs=cls.__subs;
if(subs.indexOf(name)==-1){
subs.push(name);
}
});
base.__handles.forEach(function(_47a){
var _47b=cls.__handles;
if(_47b.indexOf(_47a)==-1){
cls.__handles.push(_47a);
}
});
base.__methods.forEach(function(name){
var _47d=cls.__methods;
if(_47d.indexOf(name)==-1){
_47d.push(name);
}
});
Object.keys(base.__subEvents).forEach(function(_47e){
var _47f=cls.__subEvents;
base.__subEvents[_47e].forEach(function(_480){
var _481=_47f[_47e];
if(_481&&_481.indexOf(_480)!=-1){
return;
}
(_47f[_47e]=_47f[_47e]||[]).push(_480);
});
});
base.__onEvents.forEach(function(_482){
var _483=cls.__onEvents;
if(_483.indexOf(_482)==-1){
_483.push(_482);
}
});
}
};
});
this.Component=new Class(function(){
this.__metaclass__=_43d.__component;
var _484=function(type){
if(type==="number"){
return Number;
}else{
if(type==="string"){
return String;
}else{
if(type==="boolean"){
return Boolean;
}
}
}
};
Class.mixin(this,_442);
this.initialize=function(self,node,_488){
if(this.mixining){
return;
}
if(!node.nodeType){
if(typeof node=="string"){
node={template:node};
}
var data={};
self.__defaultOptions.forEach(function(key){
if(_488[key]===undefined){
data[key]=self.get(key);
}
});
extend(data,_488);
var _48b;
if(node.section){
_48b={};
_48b[node.section]=data;
}else{
_48b=data;
}
var str=_43e.substitute(node.template,_48b);
node=dom.Element.fromString(str);
}
self.__nodeMap={};
self.__rendered={};
self._node=dom.wrap(node);
self.__initOptions(_488);
self.__initEvents();
self.__initSubs();
self.init();
};
this.__initEvents=function(self){
if(!self.addons){
return;
}
self.addons.forEach(function(_48e){
_48e.__onEvents.forEach(function(_48f){
var _490;
if(self.__handles.some(function(_491){
if(_491.toLowerCase()==_48f){
_490=_491;
return true;
}
return false;
})){
self.addEvent(_490,function(_492){
var args=[self,_492].concat(_492._args);
_48e["on"+_48f].apply(_48e,args);
});
}
});
});
};
this.__initOptions=function(self,_495){
if(!_495){
_495={};
}
self._options={};
Object.keys(_495).forEach(function(name){
self._options[name]=_495[name];
});
self.__defaultOptions.forEach(function(name){
var data=self._node.getData(name.toLowerCase()),_499=self.__properties__[name].defaultValue,_49a;
if(data){
_49a=_484(typeof _499)(data);
self.__setOption(name,_49a);
}else{
if(_495[name]){
self.__setOption(name,_495[name]);
}else{
self.__setOption(name,_499);
}
}
var _49b=function(_49c,cls){
if(_49c){
_49c.forEach(function(_49e){
var _49f="__option_"+_49e+"_"+name;
var _4a0=name+"_"+_49e;
self.addEvent(_49f,function(_4a1){
if(cls){
cls[_4a0](self,_4a1.value);
}else{
self[_4a0](_4a1.value);
}
});
});
}
};
_49b(self.__subEvents[name]);
if(self.addons){
self.addons.forEach(function(_4a2){
_49b(_4a2.__subEvents[name],_4a2);
});
}
});
};
this.__initSubs=function(self){
self.__subs.forEach(function(name){
var sub=self.__properties__[name];
var _4a6=self._options[name];
if(_4a6&&!sub.template){
sub.template=_4a6.template;
sub.section=_4a6.templateSection;
}
if(_4a6&&_4a6.addons){
sub.type=new Class(sub.type,function(){
_4a6.addons.forEach(function(_4a7){
_43d.addon(this,_4a7);
},this);
});
}
var node;
self.__initSub(name,self.__querySub(name));
});
};
this.__initSub=function(self,name,_4ab){
if(!self._node){
return null;
}
var sub=self.__properties__[name];
var _4ad;
var _4ae=self._options[name];
if(sub.single){
if(_4ab){
_4ad=new sub.type(_4ab,_4ae);
self.__fillSub(name,_4ad);
}
}else{
if(_4ab){
_4ad=new _43d.Components(_4ab,sub.type,_4ae);
_4ad.forEach(function(comp){
self.__fillSub(name,comp);
});
}else{
_4ad=new _43d.Components([],sub.type);
}
}
self["_"+name]=_4ab;
self._set(name,_4ad);
return _4ad;
};
this.__fillSub=function(self,name,comp){
var sub=self.__properties__[name];
var node=comp._node;
self.__addNodeMap(name,String(node.uid),comp);
var comp=self.__nodeMap[name][String(node.uid)];
var _4b5=function(_4b6,cls){
if(_4b6){
_4b6.forEach(function(_4b8){
var _4b9=name+"_"+_4b8;
node.addEvent(_4b8,function(_4ba){
if(cls){
cls[_4b9].apply(cls,[self,_4ba,comp].concat(_4ba._args));
}else{
self[_4b9].apply(self,[_4ba,comp].concat(_4ba._args));
}
});
});
}
};
_4b5(self.__subEvents[name]);
if(self.addons){
self.addons.forEach(function(_4bb){
_4b5(_4bb.__subEvents[name],_4bb);
});
}
};
this.__querySub=function(self,name){
var sub=self.__properties__[name];
return sub.single?self._node.getElement(sub.selector):self._node.getElements(sub.selector);
};
this.__setOption=function(self,name,_4c1){
var _4c2="_"+name;
self[_4c2]=_4c1;
self._set(name,_4c1);
};
this.__addRendered=function(self,name,node){
var _4c6=self.__rendered;
if(!_4c6[name]){
_4c6[name]=[];
}
_4c6[name].push(node);
};
this.__addNodeMap=function(self,name,id,comp){
var _4cb=self.__nodeMap;
if(!_4cb[name]){
_4cb[name]={};
}
_4cb[name][id]=comp;
};
this._init=function(self){
};
this._invalid=function(self,msg){
if(!msg){
msg="\u8f93\u5165\u9519\u8bef";
}
alert(msg);
};
this._error=function(self,msg){
if(!msg){
msg="\u51fa\u9519\u5566\uff01";
}
alert(msg);
};
this._reset=function(self){
self.__subs.forEach(function(name){
var sub=self.__properties__[name];
var _4d4="_"+name;
if(self.__rendered[name]){
self.__rendered[name].forEach(function(node){
var comp=self.__nodeMap[name][node.uid];
delete self.__nodeMap[name][node.uid];
node.dispose();
if(sub.single){
self[name]=self[_4d4]=null;
}else{
self[name].splice(self[name].indexOf(comp),1);
self[_4d4].splice(self[_4d4].indexOf(node),1);
}
});
}
if(!sub.single){
self[name].forEach(function(comp){
comp.reset();
});
}else{
if(self[name]){
self[name].reset();
}
}
});
};
this.getOption=function(self,name){
var _4da="_"+name;
if(self[_4da]===undefined){
self[_4da]=self.__properties__[name].defaultValue;
}
return self[_4da];
};
this.setOption=_43f.overloadsetter(function(self,name,_4dd){
(function(self,name,_4e0){
var _4e1=Array.isArray(name)?name:name.split(".");
if(_4e1.length>1){
_43d.setOptionTo(self._options,_4e1,_4e0);
if(self[_4e1[0]]){
arguments.callee(self[_4e1[0]],_4e1.slice(1),_4e0);
}
}else{
self.__setOption(name,_4e0);
self.fireEvent("__option_change_"+name,{value:_4e0});
}
})(self,name,_4dd);
});
this.render=function(self,name,data){
var sub=self.__properties__[name];
var _4e6="render"+_43e.capitalize(name);
var _4e7=name+"Render";
var _4e8;
if(!!(sub.single?self[name]:self[name].length)){
return;
}
if(self[_4e7]){
_4e8=self[_4e7](function(){
return self.make(name,data);
});
}else{
if(self[_4e6]){
_4e8=self[_4e6](data);
}else{
_4e8=self.__querySub(name);
}
}
if(_4e8){
if(sub.single){
if(Array.isArray(_4e8)||_4e8.constructor===dom.Elements){
throw "\u8fd9\u662f\u4e00\u4e2a\u552f\u4e00\u5f15\u7528\u5143\u7d20\uff0c\u8bf7\u4e0d\u8981\u8fd4\u56de\u4e00\u4e2a\u6570\u7ec4";
}
self.__addRendered(name,_4e8);
}else{
if(!Array.isArray(_4e8)&&_4e8.constructor!==dom.Elements){
throw "\u8fd9\u662f\u4e00\u4e2a\u591a\u5f15\u7528\u5143\u7d20\uff0c\u8bf7\u8fd4\u56de\u4e00\u4e2a\u6570\u7ec4";
}
_4e8=new dom.Elements(_4e8);
_4e8.forEach(function(node){
self.__addRendered(name,node);
});
}
self.__initSub(name,_4e8);
}
};
this.make=function(self,name,data){
var sub=self.__properties__[name];
var _4ee="_"+name;
var _4ef={};
var _4f0=self._options[name];
extend(_4ef,_4f0);
if(data){
Object.keys(data).forEach(function(key){
_4ef[key]=data[key];
});
}
var comp=new sub.type({template:sub.template,section:sub.section},_4ef);
var node=comp._node;
if(sub.single){
self[name]=comp;
self[_4ee]=node;
}else{
self[name].push(comp);
self[_4ee].push(node);
}
self.__fillSub(name,comp);
self.__addRendered(name,node);
return comp;
};
this.setTemplate=function(self,name,_4f6,_4f7){
self.__properties__[name].template=_4f6;
self.__properties__[name].section=_4f7;
};
this.getNode=function(self){
return self._node;
};
this.define=staticmethod(_43d.define);
this.define1=staticmethod(_43d.define1);
});
this.addon=function(dict,_4fa){
if(!dict.addons){
dict.addons=[];
}
dict.addons.push(_4fa);
};
this.parseOptions=function(_4fb){
var _4fc={};
Object.keys(_4fb).forEach(function(name){
_43d.setOptionTo(_4fc,name,_4fb[name]);
});
return _4fc;
};
this.setOptionTo=function(_4fe,name,_500){
var _501=Array.isArray(name)?name:name.split(".");
for(var i=0,part;i<_501.length-1;i++){
part=_501[i];
if(_4fe[part]===undefined){
_4fe[part]={};
}
_4fe=_4fe[part];
}
_4fe[_501[_501.length-1]]=_500;
};
});
object.add("ui.decorators","events",function(_504,_505){
this.fireevent=_505.fireevent;
});
object.add("urlparse",function(){
this.urljoin=function(base,url){
var _508=_509(base);
var _50a=_509(url);
var _50b=[];
if(_50a[0]){
return url;
}else{
_50b[0]=_508[0];
_50b[1]=_508[1];
}
if(_50a[2]){
if(_50a[2][0]=="/"){
_50b[2]=_50a[2];
}else{
path=_508[2];
_50b[2]=path.substring(0,path.lastIndexOf("/")+1)+_50a[2];
}
}else{
return base;
}
return _50c(_50b);
};
var _509=this.urlparse=function(url){
return url.match(/^(?:(\w+?)\:\/\/([\w-_.]+(?::\d+)?))?(.*?)?(?:;(.*?))?(?:\?(.*?))?(?:\#(\w*))?$/i).slice(1);
};
var _50c=this.urlunparse=function(_50e){
var url="";
if(_50e[0]){
url+=_50e[0]+"://"+_50e[1];
}
url+=_50e[2];
if(_50e[3]){
url+=";"+_50e[3];
}
if(_50e[4]){
url+="?"+_50e[4];
}
if(_50e[5]){
url+="#"+_50e[5];
}
return url;
};
});
object.add("validator",function(_510){
this.isUrl=function(text){
return /^(?:(\w+?)\:\/\/([\w-_.]+(?::\d+)?))(.*?)?(?:;(.*?))?(?:\?(.*?))?(?:\#(\w*))?$/i.test(text);
};
this.isEmail=function(text){
return /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i.test(text);
};
this.isIP=function(text){
return /^(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5])$/.i.test(text);
};
});
object.add("ua.extra","sys",function(_514,sys){
var _516=sys.modules["ua"];
if(_516){
var ua=navigator.userAgent,m,_519,o={},_51b=_516.numberify;
var _51c=function(key){
try{
return window.external[key];
}
catch(e){
return null;
}
};
if(m=ua.match(/360SE/)||(_51c("twGetRunPath")&&window.external.twGetRunPath().indexOf("360se.exe")!=-1)){
o[_519="se360"]=3;
}else{
if(m=ua.match(/Maxthon/)||_51c("max_version")){
_519="maxthon";
try{
o[_519]=_51b(window.external["max_version"]);
}
catch(ex){
o[_519]=0;
}
}else{
if(m=ua.match(/TencentTraveler\s([\d.]*)/)){
o[_519="tt"]=m[1]?_51b(m[1]):0;
}else{
if(m=ua.match(/TheWorld/)){
o[_519="theworld"]=3;
}else{
if(m=ua.match(/SE\s([\d.]*)/)){
o[_519="sogou"]=m[1]?_51b(m[1]):0;
}else{
if(m=ua.match(/QQBrowser.([\d.]*)/)){
o[_519="qqbrowser"]=m[1]?_51b(m[1]):0;
}
}
}
}
}
}
_519&&(o.shell=_519);
extend(_516.ua,o);
}
});
object.add("ua.flashdetect",function(_51e){
this.getFlashVersion=function(){
var _ver=false;
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){
_ver=x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".")[0];
}
}else{
if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){
var axo=1;
var _522=3;
while(axo){
try{
_522++;
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_522);
_ver=_522;
}
catch(e){
axo=null;
}
}
}else{
try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
}
catch(e){
try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_ver=6;
axo.AllowScriptAccess="always";
}
catch(e){
if(_ver==6){
return _ver;
}
}
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
}
catch(e){
}
}
if(axo!=null){
_ver=axo.GetVariable("$version").split(" ")[1].split(",")[0];
}
}
}
return _ver;
};
});
function isUndefined(_523){
return typeof _523=="undefined";
}
function isString(_524){
return typeof _524=="string";
}
function isElement(_525){
return _525&&_525.nodeType==1;
}
function isFunction(_526){
return typeof _526=="function";
}
function isObject(_527){
return typeof _527=="object";
}
function isArray(_528){
return Object.prototype.toString.call(_528)==="[object Array]";
}
function isNumber(_529){
return typeof _529=="number";
}
function $extend(){
var _52a=arguments[0];
for(var i=1;i<arguments.length;i++){
if(typeof arguments[i]=="object"){
for(var key in arguments[i]){
_52a[key]=arguments[i][key];
}
}
}
return _52a;
}
var extendObject=$extend;
function $element(tag){
return $(document.createElement(tag));
}
(function(){
try{
window.XN=extendObject({},{env:{shortSiteName:"\u4eba\u4eba",siteName:"\u4eba\u4eba\u7f51",domain:window.location.hostname.split(".").reverse().slice(0,2).reverse().join(".")}},window.XN);
}
catch(e){
setTimeout(arguments.callee,0);
}
})();
try{
document.domain=String(XN.env.domain);
}
catch(e){
}
(function(){
var _52e=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,_530=Object.prototype.toString,_531=false,_532=true;
[0,0].sort(function(){
_532=false;
return 0;
});
var _533=function(_534,_535,_536,seed){
_536=_536||[];
_535=_535||document;
var _538=_535;
if(_535.nodeType!==1&&_535.nodeType!==9){
return [];
}
if(!_534||typeof _534!=="string"){
return _536;
}
var _539=[],m,set,_53c,_53d,_53e=true,_53f=_533.isXML(_535),_540=_534,ret,cur,pop,i;
do{
_52e.exec("");
m=_52e.exec(_540);
if(m){
_540=m[3];
_539.push(m[1]);
if(m[2]){
_53d=m[3];
break;
}
}
}while(m);
if(_539.length>1&&_545.exec(_534)){
if(_539.length===2&&Expr.relative[_539[0]]){
set=_547(_539[0]+_539[1],_535);
}else{
set=Expr.relative[_539[0]]?[_535]:_533(_539.shift(),_535);
while(_539.length){
_534=_539.shift();
if(Expr.relative[_534]){
_534+=_539.shift();
}
set=_547(_534,set);
}
}
}else{
if(!seed&&_539.length>1&&_535.nodeType===9&&!_53f&&Expr.match.ID.test(_539[0])&&!Expr.match.ID.test(_539[_539.length-1])){
ret=_533.find(_539.shift(),_535,_53f);
_535=ret.expr?_533.filter(ret.expr,ret.set)[0]:ret.set[0];
}
if(_535){
ret=seed?{expr:_539.pop(),set:_548(seed)}:_533.find(_539.pop(),_539.length===1&&(_539[0]==="~"||_539[0]==="+")&&_535.parentNode?_535.parentNode:_535,_53f);
set=ret.expr?_533.filter(ret.expr,ret.set):ret.set;
if(_539.length>0){
_53c=_548(set);
}else{
_53e=false;
}
while(_539.length){
cur=_539.pop();
pop=cur;
if(!Expr.relative[cur]){
cur="";
}else{
pop=_539.pop();
}
if(pop==null){
pop=_535;
}
Expr.relative[cur](_53c,pop,_53f);
}
}else{
_53c=_539=[];
}
}
if(!_53c){
_53c=set;
}
if(!_53c){
_533.error(cur||_534);
}
if(_530.call(_53c)==="[object Array]"){
if(!_53e){
_536.push.apply(_536,_53c);
}else{
if(_535&&_535.nodeType===1){
for(i=0;_53c[i]!=null;i++){
if(_53c[i]&&(_53c[i]===true||_53c[i].nodeType===1&&_533.contains(_535,_53c[i]))){
_536.push(set[i]);
}
}
}else{
for(i=0;_53c[i]!=null;i++){
if(_53c[i]&&_53c[i].nodeType===1){
_536.push(set[i]);
}
}
}
}
}else{
_548(_53c,_536);
}
if(_53d){
_533(_53d,_538,_536,seed);
_533.uniqueSort(_536);
}
return _536;
};
_533.uniqueSort=function(_549){
if(_54a){
_531=_532;
_549.sort(_54a);
if(_531){
for(var i=1;i<_549.length;i++){
if(_549[i]===_549[i-1]){
_549.splice(i--,1);
}
}
}
}
return _549;
};
_533.matches=function(expr,set){
return _533(expr,null,null,set);
};
_533.find=function(expr,_54f,_550){
var set;
if(!expr){
return [];
}
for(var i=0,l=Expr.order.length;i<l;i++){
var type=Expr.order[i],_555;
if((_555=Expr.leftMatch[type].exec(expr))){
var left=_555[1];
_555.splice(1,1);
if(left.substr(left.length-1)!=="\\"){
_555[1]=(_555[1]||"").replace(/\\/g,"");
set=Expr.find[type](_555,_54f,_550);
if(set!=null){
expr=expr.replace(Expr.match[type],"");
break;
}
}
}
}
if(!set){
set=_54f.getElementsByTagName("*");
}
return {set:set,expr:expr};
};
_533.filter=function(expr,set,_559,not){
var old=expr,_55c=[],_55d=set,_55e,_55f,_560=set&&set[0]&&_533.isXML(set[0]);
while(expr&&set.length){
for(var type in Expr.filter){
if((_55e=Expr.leftMatch[type].exec(expr))!=null&&_55e[2]){
var _562=Expr.filter[type],_563,item,left=_55e[1];
_55f=false;
_55e.splice(1,1);
if(left.substr(left.length-1)==="\\"){
continue;
}
if(_55d===_55c){
_55c=[];
}
if(Expr.preFilter[type]){
_55e=Expr.preFilter[type](_55e,_55d,_559,_55c,not,_560);
if(!_55e){
_55f=_563=true;
}else{
if(_55e===true){
continue;
}
}
}
if(_55e){
for(var i=0;(item=_55d[i])!=null;i++){
if(item){
_563=_562(item,_55e,i,_55d);
var pass=not^!!_563;
if(_559&&_563!=null){
if(pass){
_55f=true;
}else{
_55d[i]=false;
}
}else{
if(pass){
_55c.push(item);
_55f=true;
}
}
}
}
}
if(_563!==undefined){
if(!_559){
_55d=_55c;
}
expr=expr.replace(Expr.match[type],"");
if(!_55f){
return [];
}
break;
}
}
}
if(expr===old){
if(_55f==null){
_533.error(expr);
}else{
break;
}
}
old=expr;
}
return _55d;
};
_533.error=function(msg){
throw "Syntax error, unrecognized expression: "+msg;
};
var Expr=_533.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){
return elem.getAttribute("href");
}},relative:{"+":function(_56a,part){
var _56c=typeof part==="string",_56d=_56c&&!/\W/.test(part),_56e=_56c&&!_56d;
if(_56d){
part=part.toLowerCase();
}
for(var i=0,l=_56a.length,elem;i<l;i++){
if((elem=_56a[i])){
while((elem=elem.previousSibling)&&elem.nodeType!==1){
}
_56a[i]=_56e||elem&&elem.nodeName.toLowerCase()===part?elem||false:elem===part;
}
}
if(_56e){
_533.filter(part,_56a,true);
}
},">":function(_572,part){
var _574=typeof part==="string",elem,i=0,l=_572.length;
if(_574&&!/\W/.test(part)){
part=part.toLowerCase();
for(;i<l;i++){
elem=_572[i];
if(elem){
var _578=elem.parentNode;
_572[i]=_578.nodeName.toLowerCase()===part?_578:false;
}
}
}else{
for(;i<l;i++){
elem=_572[i];
if(elem){
_572[i]=_574?elem.parentNode:elem.parentNode===part;
}
}
if(_574){
_533.filter(part,_572,true);
}
}
},"":function(_579,part,_57b){
var _57c=done++,_57d=dirCheck,_57e;
if(typeof part==="string"&&!/\W/.test(part)){
part=part.toLowerCase();
_57e=part;
_57d=dirNodeCheck;
}
_57d("parentNode",part,_57c,_579,_57e,_57b);
},"~":function(_57f,part,_581){
var _582=done++,_583=dirCheck,_584;
if(typeof part==="string"&&!/\W/.test(part)){
part=part.toLowerCase();
_584=part;
_583=dirNodeCheck;
}
_583("previousSibling",part,_582,_57f,_584,_581);
}},find:{ID:function(_585,_586,_587){
if(typeof _586.getElementById!=="undefined"&&!_587){
var m=_586.getElementById(_585[1]);
return m?[m]:[];
}
},NAME:function(_589,_58a){
if(typeof _58a.getElementsByName!=="undefined"){
var ret=[],_58c=_58a.getElementsByName(_589[1]);
for(var i=0,l=_58c.length;i<l;i++){
if(_58c[i].getAttribute("name")===_589[1]){
ret.push(_58c[i]);
}
}
return ret.length===0?null:ret;
}
},TAG:function(_58f,_590){
return _590.getElementsByTagName(_58f[1]);
}},preFilter:{CLASS:function(_591,_592,_593,_594,not,_596){
_591=" "+_591[1].replace(/\\/g,"")+" ";
if(_596){
return _591;
}
for(var i=0,elem;(elem=_592[i])!=null;i++){
if(elem){
if(not^(elem.className&&(" "+elem.className+" ").replace(/[\t\n]/g," ").indexOf(_591)>=0)){
if(!_593){
_594.push(elem);
}
}else{
if(_593){
_592[i]=false;
}
}
}
}
return false;
},ID:function(_599){
return _599[1].replace(/\\/g,"");
},TAG:function(_59a,_59b){
return _59a[1].toLowerCase();
},CHILD:function(_59c){
if(_59c[1]==="nth"){
var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(_59c[2]==="even"&&"2n"||_59c[2]==="odd"&&"2n+1"||!/\D/.test(_59c[2])&&"0n+"+_59c[2]||_59c[2]);
_59c[2]=(test[1]+(test[2]||1))-0;
_59c[3]=test[3]-0;
}
_59c[0]=done++;
return _59c;
},ATTR:function(_59e,_59f,_5a0,_5a1,not,_5a3){
var name=_59e[1].replace(/\\/g,"");
if(!_5a3&&Expr.attrMap[name]){
_59e[1]=Expr.attrMap[name];
}
if(_59e[2]==="~="){
_59e[4]=" "+_59e[4]+" ";
}
return _59e;
},PSEUDO:function(_5a5,_5a6,_5a7,_5a8,not){
if(_5a5[1]==="not"){
if((_52e.exec(_5a5[3])||"").length>1||/^\w/.test(_5a5[3])){
_5a5[3]=_533(_5a5[3],null,null,_5a6);
}else{
var ret=_533.filter(_5a5[3],_5a6,_5a7,true^not);
if(!_5a7){
_5a8.push.apply(_5a8,ret);
}
return false;
}
}else{
if(Expr.match.POS.test(_5a5[0])||Expr.match.CHILD.test(_5a5[0])){
return true;
}
}
return _5a5;
},POS:function(_5ab){
_5ab.unshift(true);
return _5ab;
}},filters:{enabled:function(elem){
return elem.disabled===false&&elem.type!=="hidden";
},disabled:function(elem){
return elem.disabled===true;
},checked:function(elem){
return elem.checked===true;
},selected:function(elem){
elem.parentNode.selectedIndex;
return elem.selected===true;
},parent:function(elem){
return !!elem.firstChild;
},empty:function(elem){
return !elem.firstChild;
},has:function(elem,i,_5b4){
return !!_533(_5b4[3],elem).length;
},header:function(elem){
return (/h\d/i).test(elem.nodeName);
},text:function(elem){
return "text"===elem.type;
},radio:function(elem){
return "radio"===elem.type;
},checkbox:function(elem){
return "checkbox"===elem.type;
},file:function(elem){
return "file"===elem.type;
},password:function(elem){
return "password"===elem.type;
},submit:function(elem){
return "submit"===elem.type;
},image:function(elem){
return "image"===elem.type;
},reset:function(elem){
return "reset"===elem.type;
},button:function(elem){
return "button"===elem.type||elem.nodeName.toLowerCase()==="button";
},input:function(elem){
return (/input|select|textarea|button/i).test(elem.nodeName);
}},setFilters:{first:function(elem,i){
return i===0;
},last:function(elem,i,_5c4,_5c5){
return i===_5c5.length-1;
},even:function(elem,i){
return i%2===0;
},odd:function(elem,i){
return i%2===1;
},lt:function(elem,i,_5cc){
return i<_5cc[3]-0;
},gt:function(elem,i,_5cf){
return i>_5cf[3]-0;
},nth:function(elem,i,_5d2){
return _5d2[3]-0===i;
},eq:function(elem,i,_5d5){
return _5d5[3]-0===i;
}},filter:{PSEUDO:function(elem,_5d7,i,_5d9){
var name=_5d7[1],_5db=Expr.filters[name];
if(_5db){
return _5db(elem,i,_5d7,_5d9);
}else{
if(name==="contains"){
return (elem.textContent||elem.innerText||_533.getText([elem])||"").indexOf(_5d7[3])>=0;
}else{
if(name==="not"){
var not=_5d7[3];
for(var j=0,l=not.length;j<l;j++){
if(not[j]===elem){
return false;
}
}
return true;
}else{
_533.error("Syntax error, unrecognized expression: "+name);
}
}
}
},CHILD:function(elem,_5e0){
var type=_5e0[1],node=elem;
switch(type){
case "only":
case "first":
while((node=node.previousSibling)){
if(node.nodeType===1){
return false;
}
}
if(type==="first"){
return true;
}
node=elem;
case "last":
while((node=node.nextSibling)){
if(node.nodeType===1){
return false;
}
}
return true;
case "nth":
var _5e3=_5e0[2],last=_5e0[3];
if(_5e3===1&&last===0){
return true;
}
var _5e5=_5e0[0],_5e6=elem.parentNode;
if(_5e6&&(_5e6.sizcache!==_5e5||!elem.nodeIndex)){
var _5e7=0;
for(node=_5e6.firstChild;node;node=node.nextSibling){
if(node.nodeType===1){
node.nodeIndex=++_5e7;
}
}
_5e6.sizcache=_5e5;
}
var diff=elem.nodeIndex-last;
if(_5e3===0){
return diff===0;
}else{
return (diff%_5e3===0&&diff/_5e3>=0);
}
}
},ID:function(elem,_5ea){
return elem.nodeType===1&&elem.getAttribute("id")===_5ea;
},TAG:function(elem,_5ec){
return (_5ec==="*"&&elem.nodeType===1)||elem.nodeName.toLowerCase()===_5ec;
},CLASS:function(elem,_5ee){
return (" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(_5ee)>-1;
},ATTR:function(elem,_5f0){
var name=_5f0[1],_5f2=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),_5f3=_5f2+"",type=_5f0[2],_5f5=_5f0[4];
return _5f2==null?type==="!=":type==="="?_5f3===_5f5:type==="*="?_5f3.indexOf(_5f5)>=0:type==="~="?(" "+_5f3+" ").indexOf(_5f5)>=0:!_5f5?_5f3&&_5f2!==false:type==="!="?_5f3!==_5f5:type==="^="?_5f3.indexOf(_5f5)===0:type==="$="?_5f3.substr(_5f3.length-_5f5.length)===_5f5:type==="|="?_5f3===_5f5||_5f3.substr(0,_5f5.length+1)===_5f5+"-":false;
},POS:function(elem,_5f7,i,_5f9){
var name=_5f7[2],_5fb=Expr.setFilters[name];
if(_5fb){
return _5fb(elem,i,_5f7,_5f9);
}
}}};
var _545=Expr.match.POS,_5fc=function(all,num){
return "\\"+(num-0+1);
};
for(var type in Expr.match){
Expr.match[type]=new RegExp(Expr.match[type].source+(/(?![^\[]*\])(?![^\(]*\))/.source));
Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source.replace(/\\(\d+)/g,_5fc));
}
var _548=function(_600,_601){
_600=Array.prototype.slice.call(_600,0);
if(_601){
_601.push.apply(_601,_600);
return _601;
}
return _600;
};
try{
Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;
}
catch(e){
_548=function(_602,_603){
var ret=_603||[],i=0;
if(_530.call(_602)==="[object Array]"){
Array.prototype.push.apply(ret,_602);
}else{
if(typeof _602.length==="number"){
for(var l=_602.length;i<l;i++){
ret.push(_602[i]);
}
}else{
for(;_602[i];i++){
ret.push(_602[i]);
}
}
}
return ret;
};
}
var _54a;
if(document.documentElement.compareDocumentPosition){
_54a=function(a,b){
if(!a.compareDocumentPosition||!b.compareDocumentPosition){
if(a==b){
_531=true;
}
return a.compareDocumentPosition?-1:1;
}
var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;
if(ret===0){
_531=true;
}
return ret;
};
}else{
if("sourceIndex" in document.documentElement){
_54a=function(a,b){
if(!a.sourceIndex||!b.sourceIndex){
if(a==b){
_531=true;
}
return a.sourceIndex?-1:1;
}
var ret=a.sourceIndex-b.sourceIndex;
if(ret===0){
_531=true;
}
return ret;
};
}else{
if(document.createRange){
_54a=function(a,b){
if(!a.ownerDocument||!b.ownerDocument){
if(a==b){
_531=true;
}
return a.ownerDocument?-1:1;
}
var _60f=a.ownerDocument.createRange(),_610=b.ownerDocument.createRange();
_60f.setStart(a,0);
_60f.setEnd(a,0);
_610.setStart(b,0);
_610.setEnd(b,0);
var ret=_60f.compareBoundaryPoints(Range.START_TO_END,_610);
if(ret===0){
_531=true;
}
return ret;
};
}
}
}
_533.getText=function(_612){
var ret="",elem;
for(var i=0;_612[i];i++){
elem=_612[i];
if(elem.nodeType===3||elem.nodeType===4){
ret+=elem.nodeValue;
}else{
if(elem.nodeType!==8){
ret+=_533.getText(elem.childNodes);
}
}
}
return ret;
};
(function(){
var form=document.createElement("div"),id="script"+(new Date()).getTime();
form.innerHTML="<a name='"+id+"'/>";
var root=document.documentElement;
root.insertBefore(form,root.firstChild);
if(document.getElementById(id)){
Expr.find.ID=function(_619,_61a,_61b){
if(typeof _61a.getElementById!=="undefined"&&!_61b){
var m=_61a.getElementById(_619[1]);
return m?m.id===_619[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===_619[1]?[m]:undefined:[];
}
};
Expr.filter.ID=function(elem,_61e){
var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");
return elem.nodeType===1&&node&&node.nodeValue===_61e;
};
}
root.removeChild(form);
root=form=null;
})();
(function(){
var div=document.createElement("div");
div.appendChild(document.createComment(""));
if(div.getElementsByTagName("*").length>0){
Expr.find.TAG=function(_621,_622){
var _623=_622.getElementsByTagName(_621[1]);
if(_621[1]==="*"){
var tmp=[];
for(var i=0;_623[i];i++){
if(_623[i].nodeType===1){
tmp.push(_623[i]);
}
}
_623=tmp;
}
return _623;
};
}
div.innerHTML="<a href='#'></a>";
if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){
Expr.attrHandle.href=function(elem){
return elem.getAttribute("href",2);
};
}
div=null;
})();
if(document.querySelectorAll){
(function(){
var _627=_533,div=document.createElement("div");
div.innerHTML="<p class='TEST'></p>";
if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){
return;
}
_533=function(_629,_62a,_62b,seed){
_62a=_62a||document;
if(!seed&&_62a.nodeType===9&&!_533.isXML(_62a)){
try{
return _548(_62a.querySelectorAll(_629),_62b);
}
catch(e){
}
}
return _627(_629,_62a,_62b,seed);
};
for(var prop in _627){
_533[prop]=_627[prop];
}
div=null;
})();
}
(function(){
var div=document.createElement("div");
div.innerHTML="<div class='test e'></div><div class='test'></div>";
if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0){
return;
}
div.lastChild.className="e";
if(div.getElementsByClassName("e").length===1){
return;
}
Expr.order.splice(1,0,"CLASS");
Expr.find.CLASS=function(_62f,_630,_631){
if(typeof _630.getElementsByClassName!=="undefined"&&!_631){
return _630.getElementsByClassName(_62f[1]);
}
};
div=null;
})();
function dirNodeCheck(dir,cur,_634,_635,_636,_637){
for(var i=0,l=_635.length;i<l;i++){
var elem=_635[i];
if(elem){
elem=elem[dir];
var _63b=false;
while(elem){
if(elem.sizcache===_634){
_63b=_635[elem.sizset];
break;
}
if(elem.nodeType===1&&!_637){
elem.sizcache=_634;
elem.sizset=i;
}
if(elem.nodeName.toLowerCase()===cur){
_63b=elem;
break;
}
elem=elem[dir];
}
_635[i]=_63b;
}
}
}
function dirCheck(dir,cur,_63e,_63f,_640,_641){
for(var i=0,l=_63f.length;i<l;i++){
var elem=_63f[i];
if(elem){
elem=elem[dir];
var _645=false;
while(elem){
if(elem.sizcache===_63e){
_645=_63f[elem.sizset];
break;
}
if(elem.nodeType===1){
if(!_641){
elem.sizcache=_63e;
elem.sizset=i;
}
if(typeof cur!=="string"){
if(elem===cur){
_645=true;
break;
}
}else{
if(_533.filter(cur,[elem]).length>0){
_645=elem;
break;
}
}
}
elem=elem[dir];
}
_63f[i]=_645;
}
}
}
_533.contains=document.compareDocumentPosition?function(a,b){
return !!(a.compareDocumentPosition(b)&16);
}:function(a,b){
return a!==b&&(a.contains?a.contains(b):true);
};
_533.isXML=function(elem){
var _64b=(elem?elem.ownerDocument||elem:0).documentElement;
return _64b?_64b.nodeName!=="HTML":false;
};
var _547=function(_64c,_64d){
var _64e=[],_64f="",_650,root=_64d.nodeType?[_64d]:_64d;
while((_650=Expr.match.PSEUDO.exec(_64c))){
_64f+=_650[0];
_64c=_64c.replace(Expr.match.PSEUDO,"");
}
_64c=Expr.relative[_64c]?_64c+"*":_64c;
for(var i=0,l=root.length;i<l;i++){
_533(_64c,root[i],_64e);
}
return _533.filter(_64f,_64e);
};
window.Sizzle=_533;
})();
function $(id){
var _655;
if(id==null){
_655=null;
}else{
if(isString(id)||isNumber(id)){
_655=Sizzle("#"+id)[0];
}else{
_655=id;
}
}
if(_655){
XN.element.extend(_655);
}
return _655||null;
}
if(!Function.prototype.bind){
Function.prototype.bind=function(_656){
var _657=this;
return function(){
_657.apply(_656,arguments);
};
};
}
var xn_getEl=ge=getEl=$X=$;
var $xElement=$element;
if(typeof XN=="undefined"){
XN={};
}
$extend(XN,{namespace:function(){
var a=arguments,o=null,i,j,d;
for(i=0;i<a.length;i++){
d=a[i].split(".");
o=XN;
for(j=(d[0]=="XN")?1:0;j<d.length;j++){
o[d[j]]=o[d[j]]||{};
o=o[d[j]];
}
}
return o;
}});
XN.namespace("ui");
XN.namespace("util");
XN.namespace("app");
XN.namespace("page");
XN.namespace("config");
XN.APP=XN.App=XN.app;
XN.PAGE=XN.Page=XN.page;
XN.CONFIG=XN.Config=XN.config;
XN.DEBUG_MODE=false;
XN.debug={log:function(){
},on:function(){
XN.DEBUG_MODE=true;
if(window.console&&console.log){
XN.debug.log=function(s){
console.log(s);
};
}
},off:function(){
XN.debug.log=function(){
};
}};
XN.log=function(s){
XN.debug.log(s);
};
XN.DEBUG=XN.Debug=XN.debug;
XN.debug.On=XN.debug.on;
XN.debug.Off=XN.debug.off;
XN.namespace("env");
$extend(XN.env,{domain_reg:XN.env.domain.replace(/\./g,"\\."),staticRoot:"http://s.xnimg.cn/",CDNstaticRoot:"http://a.xnimg.cn/",swfRoot:"http://static.xiaonei.com/",wwwRoot:"http://"+XN.env.domain+"/"});
XN.ENV=XN.Env=XN.env;
XN.array={toQueryString:function(a,key){
var rt=[],t;
for(var k in a){
t=a[k];
if(isFunction(t)){
continue;
}
if(isObject(t)){
rt.push(arguments.callee(t,k));
}else{
if(/^\d+$/.test(k)){
rt.push((key||k)+"="+encodeURIComponent(t));
}else{
rt.push(k+"="+encodeURIComponent(t));
}
}
}
return rt.join("&");
},each:function(a,func){
if(!a){
return;
}
if(!isUndefined(a.length)||!isUndefined(a[0])){
for(var i=0,j=a.length;i<j;i++){
if(func.call(a,i,a[i])===false){
break;
}
}
}else{
for(var key in a){
if(!isFunction(a[key])){
if(func.call(a,key,a[key])===false){
break;
}
}
}
}
},include:function(a,_66a){
var r=false;
XN.array.each(a,function(i,v){
if(v===_66a){
r=true;
return false;
}
});
return r;
},build:function(o){
var rt=[];
for(var i=0,j=o.length;i<j;i++){
rt.push(o[i]);
}
return rt;
}};
XN.ARRAY=XN.Array=XN.array;
XN.string={nl2br:function(str){
return (str||"").replace(/([^>])\n/g,"$1<br />");
},trim:function(str){
return (str||"").replace(/^\s+|\s+$/g,"");
},ltrim:function(str){
return (str||"").replace(/^\s+/,"");
},rtrim:function(str){
return (str||"").replace(/\s+$/,"");
},strip:function(str){
return XN.string.trim(str);
},stripTags:function(str){
return str.replace(/<\/?[^>]+>/igm,"");
},escapeHTML:function(str){
return str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
},unescapeHTML:function(str){
return str.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&nbsp;/g," ").replace(/&quot;/g,"\"").replace(/&amp;/g,"&");
},include:function(str,key){
return str.indexOf(key)>-1;
},startsWith:function(str,key){
return str.indexOf(key)===0;
},endsWith:function(str,key){
var d=str.length-key.length;
return d>=0&&str.lastIndexOf(key)===d;
},isBlank:function(str){
return /^\s*$/.test(str);
},isEmail:function(str){
return /^[A-Z_a-z0-9-\.]+@([A-Z_a-z0-9-]+\.)+[a-z0-9A-Z]{2,4}$/.test(str);
},isMobile:function(str){
return /^((\(\d{2,3}\))|(\d{3}\-))?((1[345]\d{9})|(18\d{9}))$/.test(str);
},isUrl:function(str){
return /^(http:|ftp:)\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"])*$/.test(str);
},isIp:function(str){
return /^(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5])$/.test(str);
},isNumber:function(str){
return /^\d+$/.test(str);
},isZip:function(str){
return /^[1-9]\d{5}$/.test(str);
},isEN:function(str){
return /^[A-Za-z]+$/.test(str);
},isJSON:function(str){
if(!isString(str)||str===""){
return false;
}
str=str.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");
return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
},getQuery:function(key,url){
url=url||window.location.href+"";
if(url.indexOf("#")!==-1){
url=url.substring(0,url.indexOf("#"));
}
var rts=[],rt;
var _68e=new RegExp("(^|\\?|&)"+key+"=([^&]*)(?=&|#|$)","g");
while((rt=_68e.exec(url))!=null){
rts.push(decodeURIComponent(rt[2]));
}
if(rts.length==0){
return null;
}
if(rts.length==1){
return rts[0];
}
return rts;
},setQuery:function(key,_690,url){
url=url||window.location.href+"";
var hash="";
if(!/^http/.test(url)){
return url;
}
if(url.indexOf("#")!==-1){
hash=url.substring(url.indexOf("#"));
}
url=url.replace(hash,"");
url=url.replace(new RegExp("(^|\\?|&)"+key+"=[^&]*(?=&|#|$)","g"),"");
_690=isArray(_690)?_690:[_690];
for(var i=_690.length-1;i>=0;i--){
_690[i]=encodeURIComponent(_690[i]);
}
var p=key+"="+_690.join("&"+key+"=");
return url+(/\?/.test(url)?"&":"?")+p+hash;
}};
XN.String=XN.STRING=XN.string;
XN.string.isNum=XN.string.isNumber;
window.isJSON=XN.string.isJSON;
(function(){
runOnceFunc={};
XN.func={empty:function(){
},runOnce:function(func){
if(runOnceFunc[func]){
return null;
}
runOnceFunc[func]=true;
return func();
}};
})();
XN.FUNC=XN.Func=XN.func;
(function(){
XN.browser={IE:!!(window.attachEvent&&!window.opera),IE6:navigator.userAgent.indexOf("MSIE 6.0")>-1,IE7:navigator.userAgent.indexOf("MSIE 7.0")>-1,IE8:navigator.userAgent.indexOf("MSIE 8.0")>-1,Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1,copy:function(o){
function onfail(){
if(isElement(o)){
o.select();
}
}
var str;
if(isElement(o)){
str=o.value;
}else{
str=o;
}
if(window.clipboardData&&clipboardData.setData){
if(clipboardData.setData("text",str)){
return true;
}
}else{
XN.DO.alert({message:"\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u811a\u672c\u590d\u5236,\u8bf7\u5c1d\u8bd5\u624b\u52a8\u590d\u5236",callBack:function(){
onfail();
}});
return false;
}
XN.DO.alert({message:"\u60a8\u7684\u6d4f\u89c8\u5668\u8bbe\u7f6e\u4e0d\u5141\u8bb8\u811a\u672c\u8bbf\u95ee\u526a\u5207\u677f",callBack:function(){
onfail();
}});
return false;
}};
})();
XN.BROWSER=XN.Browser=XN.browser;
XN.cookie={get:function(name){
var _699=name+"=";
var ca=document.cookie.split(";");
for(var i=0;i<ca.length;i++){
var c=ca[i];
while(c.charAt(0)==" "){
c=c.substring(1,c.length);
}
if(c.indexOf(_699)==0){
return decodeURIComponent(c.substring(_699.length,c.length));
}
}
return null;
},set:function(name,_69e,days,path,_6a1,_6a2){
var _6a3;
if(isNumber(days)){
var date=new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
_6a3=date.toGMTString();
}else{
if(isString(days)){
_6a3=days;
}else{
_6a3=false;
}
}
document.cookie=name+"="+encodeURIComponent(_69e)+(_6a3?";expires="+_6a3:"")+(path?";path="+path:"")+(_6a1?";domain="+_6a1:"")+(_6a2?";secure":"");
},del:function(name,path,_6a7,_6a8){
XN.cookie.set(name,"",-1,path,_6a7,_6a8);
}};
XN.COOKIE=XN.Cookie=XN.cookie;
(function(){
var _6a9=XN.browser;
XN.event={isCapsLockOn:function(e){
var c=e.keyCode||e.which;
var s=e.shiftKey;
if(((c>=65&&c<=90)&&!s)||((c>=97&&c<=122)&&s)){
return true;
}
return false;
},element:function(e){
var n=e.target||e.srcElement;
return This.resolveTextNode(n);
},relatedTarget:function(e){
var t=e.relatedTarget;
if(!t){
if(e.type=="mouseout"||e.type=="mouseleave"){
t=e.toElement;
}else{
if(e.type=="mouseover"){
t=e.fromElement;
}
}
}
return This.resolveTextNode(t);
},resolveTextNode:function(n){
try{
if(n&&3==n.nodeType){
return n.parentNode;
}
}
catch(e){
}
return n;
},pointerX:function(_6b3){
return _6b3.pageX||(_6b3.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
},pointerY:function(_6b4){
return _6b4.pageY||(_6b4.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
},isStrictMode:document.compatMode!="BackCompat",pageHeight:function(){
return this.isStrictMode?Math.max(document.documentElement.scrollHeight,document.documentElement.clientHeight):Math.max(document.body.scrollHeight,document.body.clientHeight);
},pageWidth:function(){
return this.isStrictMode?Math.max(document.documentElement.scrollWidth,document.documentElement.clientWidth):Math.max(document.body.scrollWidth,document.body.clientWidth);
},winWidth:function(){
return this.isStrictMode?document.documentElement.clientWidth:document.body.clientWidth;
},winHeight:function(){
return this.isStrictMode?document.documentElement.clientHeight:document.body.clientHeight;
},scrollTop:function(){
if(XN.browser.WebKit){
return window.pageYOffset;
}
return this.isStrictMode?document.documentElement.scrollTop:document.body.scrollTop;
},scrollLeft:function(){
if(XN.browser.WebKit){
return window.pageXOffset;
}
return this.isStrictMode?document.documentElement.scrollLeft:document.body.scrollLeft;
},stop:null,addEvent:function(el,name,func,cap){
var els=[];
el=$(el);
if(isArray(el)){
els=el;
}else{
els.push(el);
}
if(els.length==0){
return el;
}
XN.array.each(els,function(i,v){
XN.event._addEvent(v,name,func,cap);
});
return el;
},delEvent:function(el,name,func,cap){
var els=[];
el=$(el);
if(isArray(el)){
els=el;
}else{
els.push(el);
}
if(els.length==0){
return el;
}
XN.array.each(els,function(i,v){
XN.event._delEvent(v,name,func,cap);
});
return el;
},_addEvent:null,_delEvent:null,enableCustomEvent:function(obj){
$extend(obj,{addEvent:function(type,func){
if(!this._customEventListeners){
this._customEventListeners={};
}
var _6c6=this._customEventListeners;
if(isUndefined(_6c6[type])){
_6c6[type]=[];
}
_6c6[type].push(func);
return this;
},delEvent:function(type,func){
var _6c9=this._customEventListeners[type];
if(_6c9){
for(var i=_6c9.length-1;i>=0;i--){
if(_6c9[i]==func){
_6c9[i]=null;
break;
}
}
}
return this;
},fireEvent:function(type){
if(!this._customEventListeners||!this._customEventListeners[type]){
return;
}
var _6cc=this._customEventListeners[type],ars=XN.array.build(arguments);
ars.shift();
for(var i=0,j=_6cc.length;i<j;i++){
if(_6cc[i]){
try{
_6cc[i].apply(this,ars);
}
catch(ox){
if(XN.DEBUG_MODE){
throw ox;
}
}
}
}
}});
return obj;
}};
var This=XN.event;
if(_6a9.IE){
This.stop=function(_6d0){
_6d0.returnValue=false;
_6d0.cancelBubble=true;
};
}else{
This.stop=function(_6d1){
_6d1.preventDefault();
_6d1.stopPropagation();
};
}
var _6d2=function(_6d3,_6d4){
var p=_6d3.relatedTarget;
while(p&&p!=_6d4){
try{
p=p.parentNode;
}
catch(error){
p=_6d4;
}
}
return p!==_6d4;
};
if(window.attachEvent&&!_6a9.Opera){
function wrapEvent(_6d6){
_6d6.stopPropagation=function(){
this.cancelBubble=true;
};
_6d6.preventDefault=function(){
this.returnValue=false;
};
return _6d6;
}
This._addEvent=function(_6d7,name,func){
_6d7=$(_6d7);
if(!_6d7._eventListeners[name]){
_6d7._eventListeners[name]=[];
}
var _6da=function(){
var e=wrapEvent(window.event);
func.call(_6d7,e);
};
_6da.innerFunc=func;
_6d7._eventListeners[name].push(_6da);
if(name=="keypress"){
name="keydown";
}
if(name=="input"){
name="propertychange";
}
_6d7.attachEvent("on"+name,_6da);
return _6d7;
};
This._delEvent=function(_6dc,name,func){
_6dc=$(_6dc);
if(name=="keypress"){
name="keydown";
}
if(name=="input"){
name="propertychange";
}
for(var i=0,_6e0;i<_6dc._eventListeners[name].length;i++){
_6e0=_6dc._eventListeners[name][i];
if(_6e0.innerFunc===func){
break;
}
}
_6dc.detachEvent("on"+name,_6e0);
return _6dc;
};
}else{
if(window.addEventListener){
This._addEvent=function(_6e1,name,func,_6e4){
_6e1=$(_6e1);
if(name=="mouseleave"){
_6e1.onmouseleave=function(e){
e=e||window.event;
if(_6d2(e,_6e1)&&func){
func.call(_6e1,e);
}
};
_6e1.addEventListener("mouseout",_6e1.onmouseleave,_6e4);
return _6e1;
}
if(name=="keypress"&&_6a9.WebKit){
name="keydown";
}
_6e1.addEventListener(name,func,_6e4);
return _6e1;
};
This._delEvent=function(_6e6,name,func,_6e9){
_6e6=$(_6e6);
if(name=="mouseleave"){
_6e6.removeEventListener("mouseout",_6e6.onmouseleave,_6e9);
return _6e6;
}
if(name=="keypress"&&_6a9.WebKit){
name="keydown";
}
_6e6.removeEventListener(name,func,_6e9);
return _6e6;
};
}
}
})();
XN.events={};
XN.event.enableCustomEvent(XN.events);
XN.EVENT=XN.Event=XN.event;
(function(){
var _6ea=XN.event;
var _6eb=XN.array;
var _6ec=XN.browser;
var _6ed=false;
var _6ee=[];
var _6ef=[];
function runHooks(){
if(!_6ee){
return;
}
XN.array.each(_6ee,function(i,v){
try{
v();
}
catch(e){
if(XN.DEBUG_MODE){
throw e;
}
}
});
XN.array.each(_6ef,function(i,v){
setTimeout(v,0);
});
}
var _6f4=null;
function createShadow(_6f5,_6f6){
_6f5=_6f5||0.3;
_6f6=_6f6||2000;
var el=$element("div");
_6f4=el;
XN.element.setStyle(el,["position:absolute;","top:0;","left:0;","background:#000;","z-index:"+_6f6+";","opacity:"+_6f5+";","filter:alpha(opacity="+(_6f5*100)+");"].join(""));
el.innerHTML=["<iframe width=\"100%\" height=\"100%\" frameBorder=\"0\" style=\"position:absolute;top:0;left:0;z-index:1;\"></iframe>","<div style=\"position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000000;z-index:2;height:expression(this.parentNode.offsetHeight);\"></div>"].join("");
function resize(){
el.hide();
el.style.height=XN.event.pageHeight()+"px";
el.style.width=XN.event.pageWidth()+"px";
el.show();
}
resize();
XN.event.addEvent(window,"resize",function(e){
if(_6f4&&_6f4.style.display!="none"){
try{
resize();
}
catch(e){
}
}
});
document.body.insertBefore(el,document.body.firstChild);
}
XN.dom={disable:function(_6f9,_6fa){
if(!_6f4){
createShadow(_6f9,_6fa);
}
},enable:function(){
if(_6f4){
_6f4.remove();
_6f4=null;
}
},insertAfter:function(_6fb,_6fc){
_6fb=$(_6fb);
_6fc=$(_6fc);
var _6fd=_6fc.parentNode;
if(_6fd.lastChild==_6fc){
_6fd.appendChild(_6fb);
}else{
_6fd.insertBefore(_6fb,_6fc.nextSibling);
}
},getElementsByClassName:function(_6fe,_6ff,_700){
var c=($(_6ff)||document).getElementsByTagName(_700||"*")||document.all;
var _702=[];
var _exp=new RegExp("(^|\\s)"+_6fe+"(\\s|$)");
_6eb.each(c,function(i,v){
if(_exp.test(v.className)){
_702.push(v);
}
});
return _702;
},ready:function(f,_707){
if(isUndefined(_707)){
_707=false;
}
if(_6ed){
_707?setTimeout(f,0):f();
}else{
_707?_6ef.push(f):_6ee.push(f);
}
},preloadImg:function(src){
src=isArray(src)?src:[src];
_6eb.each(src,function(i,v){
new Image().src=v;
});
}};
if(_6ec.WebKit&&parseFloat(navigator.userAgent.match(/AppleWebKit\/([\d\.]+)/i)[1])<525){
var _70b=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
_6ed=true;
clearInterval(_70b);
runHooks();
}
},10);
}else{
if(document.addEventListener){
document.addEventListener("DOMContentLoaded",function(){
_6ed=true;
runHooks();
},false);
}else{
var _70b=setInterval(function(){
try{
document.body.doScroll("left");
clearInterval(_70b);
_6ed=true;
runHooks();
}
catch(e){
}
},20);
}
}
})();
XN.DOM=XN.Dom=XN.dom;
XN.dom.readyDo=XN.dom.ready;
XN.dom.ready(function(){
$=ge=getEl=xn_getEl;
});
XN.namespace("config");
XN.config.jumpOut=true;
XN.dom.ready(function(){
if(XN.config.parentDomain||(!XN.config.jumpOut)){
return;
}
try{
top.location.href.indexOf("x");
}
catch(e){
try{
top.location=self.location;
}
catch(e){
}
}
});
(function(){
var _70c={};
var _70d={};
XN.getFileVersionNum=function(file){
return _70d[file];
};
function hasLoad(file){
return !!getFile(file);
}
function getFile(file){
return _70c[encodeURIComponent(file)];
}
function mark(file){
var obj={};
obj.file=file;
obj.isLoad=true;
obj.isLoaded=true;
_70c[encodeURIComponent(file)]=obj;
}
function addFile(file){
var obj={};
obj.file=file;
obj.isLoaded=false;
XN.EVENT.enableCustomEvent(obj);
obj.addEvent("load",function(){
this.isLoaded=true;
});
_70c[encodeURIComponent(file)]=obj;
var el=document.createElement("script");
el.type="text/javascript";
el.src=file;
el.async=true;
obj.element=el;
if(XN.Browser.IE){
el.onreadystatechange=function(){
if((this.readyState=="loaded"||this.readyState=="complete")&&!this.hasLoad){
this.hasLoad=true;
getFile(file).fireEvent("load");
}
};
}else{
el.onload=function(){
getFile(file).fireEvent("load");
};
}
Sizzle("head")[0].insertBefore(el,null);
}
function loadFile(file,_717){
var isJS=false,_719=false;
if(isObject(file)){
isJS=(file.type=="js");
_719=(file.type=="css");
file=file.file;
}
file=getFullName(file);
if(/\.js(\?|$)/.test(file)||isJS){
if(!hasLoad(file)){
addFile(file);
}
if(!_717){
return;
}
if(getFile(file).isLoaded){
_717.call(getFile(file));
}else{
getFile(file).addEvent("load",_717);
}
}else{
if(/\.css(\?|$)/.test(file)||_719){
if(hasLoad(file)){
if(_717){
_717.call(getFile(file));
}
return;
}
mark(file);
var el=$element("link");
el.rel="stylesheet";
el.type="text/css";
el.href=file;
Sizzle("head")[0].insertBefore(el,null);
if(_717){
_717.call(getFile(file));
}
}
}
}
function getFullName(file){
XN.func.runOnce(loadVersion);
if(!_70d[file]){
return file;
}
return _70d[file].file;
}
function getVersion(file){
var _71d;
if(_71d=new RegExp("("+XN.env.staticRoot+")"+"(a?\\d+)/([^?]*)").exec(file)){
_70d[_71d[1]+_71d[3]]={file:file,version:_71d[2]};
}else{
if(_71d=new RegExp("(.*)\\?ver=(d+)(..*)").exec(file)){
_70d[_71d[1]]={file:file,version:_71d[2]};
}
}
}
XN.getFileVersion=function(_71e){
XN.array.each(_71e,function(i,v){
getVersion(v);
});
};
XN.loadFile=function(file,_722){
XN.DOM.readyDo(function(){
loadFile(file,_722);
});
};
XN.loadFiles=function(_723,_724){
var f=_723.length;
function isAllLoad(){
f--;
if(f===0&&_724){
_724();
}
}
XN.array.each(_723,function(i,v){
XN.loadFile(v,isAllLoad);
});
};
XN.getVersion=function(file){
getVersion(file);
};
function loadVersion(){
XN.array.each(document.getElementsByTagName("script"),function(i,v){
if(v.src){
mark(v.src);
getVersion(v.src);
}
if(v.getAttribute("vsrc")){
getVersion(v.getAttribute("vsrc"));
}
});
XN.array.each(document.getElementsByTagName("link"),function(i,v){
if(v.rel&&v.rel=="stylesheet"){
mark(v.href);
getVersion(v.href);
}
if(v.getAttribute("vhref")){
getVersion(v.getAttribute("vhref"));
}
});
XN.log("load file version:");
XN.log(_70d);
}
XN.dynamicLoad=function(file){
XN.array.each(file.funcs,function(i,func){
window[func]=function(){
var ars=arguments;
window[func]=null;
if(file.file){
file.files=[file.file];
}
XN.loadFiles(file.files,function(){
window[func].apply(null,ars);
if(file.callBack){
file.callBack.call(null);
}
});
};
});
};
XN.namespace("img");
XN.img.getVersion=function(file){
XN.func.runOnce(loadVersion);
if(!_70d[file]){
return "";
}
return _70d[file].version;
};
XN.img.getFullName=function(file){
return getFullName(file);
};
})();
(function(){
var _733=XN.event.addEvent;
var _734=XN.event.delEvent;
var _735=XN.browser;
function getDom(str){
var tmp=document.createElement("div");
tmp.style.display="none";
document.body.appendChild(tmp);
tmp.innerHTML=str;
var dom=document.createElement("div");
while(tmp.firstChild){
dom.appendChild(tmp.firstChild);
}
tmp.parentNode.removeChild(tmp);
return dom;
}
var t=document.createElement("div");
t.innerHTML="<TEST_TAG></TEST_TAG>";
var _73a=t.firstChild===null;
XN.element={clear:function(_73b){
_73b=$(_73b);
_73b.innerHTML="";
return _73b;
},hover:function(_73c,_73d,_73e){
_73c=$(_73c);
_73e=_73e?$(_73e):_73c;
_733(_73c,"mouseover",function(){
_73e.addClass(_73d);
},false);
_733(_73c,"mouseleave",function(){
_73e.delClass(_73d);
},false);
return _73c;
},scrollTo:function(_73f,_740){
_73f=$(_73f);
_740=_740||"normal";
switch(_740){
case "slow":
XN.EFFECT.scrollTo(_73f);
break;
default:
window.scrollTo(0,_73f.realTop());
break;
}
return _73f;
},visible:function(_741){
_741=$(_741);
return _741.style.display!="none"&&_741.style.visibility!="hidden";
},toggleClass:function(_742,_743,_744){
if(isUndefined(_744)){
if(This.hasClassName(_742,_743)){
This.delClass(_742,_743);
}else{
This.addClass(_742,_743);
}
}else{
if(This.hasClassName(_742,_743)){
This.delClass(_742,_743);
This.addClass(_742,_744);
}else{
This.addClass(_742,_743);
This.delClass(_742,_744);
}
}
return $(_742);
},toggleText:function(_746,_747,_748){
if(_746.innerHTML==_747){
_746.innerHTML=_748;
}else{
_746.innerHTML=_747;
}
},hasClassName:function(_749,_74a){
return new RegExp("(^|\\s+)"+_74a+"(\\s+|$)").test($(_749).className);
},addClass:function(_74b,_74c){
_74b=$(_74b);
if(This.hasClassName(_74b,_74c)){
return _74b;
}
_74b.className+=" "+_74c;
return _74b;
},delClass:function(_74d,_74e){
_74d=$(_74d);
_74d.className=_74d.className.replace(new RegExp("(^|\\s+)"+_74e+"(\\s+|$)","g")," ");
return _74d;
},show:function(_74f,_750){
_74f=$(_74f);
if(_74f.style.display!="none"){
return;
}
_750=_750||"normal";
switch(_750){
case "normal":
_74f.style.display="";
break;
case "fade":
XN.EFFECT.fadeIn(_74f,function(e){
e.style.display="";
});
break;
case "slide":
XN.EFFECT.slideOpen(_74f);
break;
case "delay":
setTimeout(function(){
_74f.style.display="";
},2000);
break;
}
return _74f;
},hide:function(_752,_753){
_752=$(_752);
if(_752.style.display=="none"){
return;
}
_753=_753||"normal";
switch(_753){
case "normal":
_752.style.display="none";
break;
case "fade":
XN.EFFECT.fadeOut(_752,function(e){
e.style.display="none";
});
break;
case "slide":
XN.EFFECT.slideClose(_752);
break;
case "delay":
setTimeout(function(){
_752.style.display="none";
},2000);
break;
}
return _752;
},remove:function(_755){
var _755=$(_755);
_755.parentNode.removeChild(_755);
return _755;
},setStyle:function(_756,_757){
var _756=$(_756);
_756.style.cssText+=";"+_757;
return _756;
},getStyle:function(_758,_759){
_758=$(_758);
_759=_759=="float"?"cssFloat":_759;
var _75a=_758.style[_759];
if(!_75a){
var css=document.defaultView.getComputedStyle(_758,null);
_75a=css?css[_759]:null;
}
if(_759=="opacity"){
return _75a?parseFloat(_75a):1;
}
return _75a=="auto"?null:_75a;
},addEvent:function(){
_733.apply(null,arguments);
return arguments[0];
},delEvent:function(){
_734.apply(null,arguments);
return arguments[0];
},_eventListeners:{},matchesSelector:function(_75c,_75d){
return Sizzle.matches(_75d,[_75c]).length>0;
},getData:function(_75e,name){
return _75e.getAttribute("data-"+name);
},delegate:function(_760,_761,type,_763){
$(_760).addEvent(type,function(e){
var ele=$(e.target||e.srcElement);
do{
if(ele&&ele.matchesSelector(_761)){
_763.call(ele,e);
}
}while(ele=$(ele.parentNode));
});
},addChild:function(_766,_767){
_766=$(_766);
if(isString(_767)||isNumber(_767)){
var _768=String(_767).charAt(0)=="#"?Sizzle(_767)[0]:_767;
if(isString(_767)||isNumber(_767)){
_766.innerHTML+=_768;
}else{
_766.appendChild(_768);
}
}else{
if(isElement(_767)){
_766.appendChild(_767);
}else{
if(_767.iAmUIelement){
_766.appendChild($(_767.frame));
}else{
if(_767.iAmXmlhttp){
_767.fillTo=_766;
_766.startLoading();
}
}
}
}
return _766;
},delChild:function(_769,_76a){
_76a=$(_76a);
_76a.remove();
return $(_769);
},setContent:function(_76b,c){
_76b=$(_76b);
_76b.innerHTML="";
_76b.addChild(c);
return _76b;
},setHTML:function(_76d,str){
if(_73a){
_76d.innerHTML="";
var _76f=getDom(str);
while(_76f.firstChild){
_76d.appendChild(_76f.firstChild);
}
}else{
_76d.innerHTML=str;
}
},getPosition:function(_770,_771){
_771=$(_771)||document.body;
_770=$(_770);
var rl=0;
var rt=0;
var p=_770;
try{
while(p&&p!=_771){
rl+=p.offsetLeft;
rt+=p.offsetTop;
p=p.offsetParent;
}
}
catch(e){
}
return {"left":rl,"top":rt};
},realLeft:function(_775,p){
return This.getPosition(_775,p||null).left;
},realTop:function(_777,p){
return This.getPosition(_777,p||null).top;
},appendHTML:function(_779,str,_77b){
_779=$(_779);
var f=document.createDocumentFragment();
var t=$element("div");
t.innerHTML=str;
while(t.firstChild){
f.appendChild(t.firstChild);
}
var tmp=XN.array.build(f.childNodes);
_779.appendChild(f);
if(_77b){
return tmp;
}
return _779;
},findFirstClass:function(_77f,_780){
_77f=$(_77f);
var els=XN.dom.getElementsByClassName(_780,_77f);
return $(els[0])||null;
},startLoading:function(_782,msg){
_782=$(_782);
_782.innerHTML="<center><img src=\""+XN.ENV.staticRoot+"img/indicator.gif\" />"+(msg||"\u52a0\u8f7d\u4e2d...")+"</center>";
return _782;
},stopLoading:function(_784){
_784=$(_784);
return _784;
},eval_inner_JS:function(el){
var js=$(el).getElementsByTagName("script");
XN.array.each(js,function(i,s){
if(s.src){
XN.loadFile(s.src);
}else{
var _789="__inner_js_out_put = [];\n";
_789+=s.innerHTML.replace(/document\.write/g,"__inner_js_out_put.push");
eval(_789);
if(__inner_js_out_put.length!==0){
var tmp=document.createDocumentFragment();
$(tmp).appendHTML(__inner_js_out_put.join(""));
s.parentNode.insertBefore(tmp,s);
}
}
});
}};
XN.element.extend=function(_78b){
var _78c=This.extend.cache;
for(var m in This){
if(!(m in _78b)){
_78b[m]=_78c.findOrStore(This[m]);
}
}
return _78b;
};
XN.element.extend.cache={findOrStore:function(_78e){
return this[_78e]=this[_78e]||function(){
return _78e.apply(null,[this].concat(XN.array.build(arguments)));
};
}};
var This=XN.element;
if(_735.IE){
XN.element.getStyle=function(_78f,_790){
_78f=$(_78f);
_790=(_790=="float"||_790=="cssFloat")?"styleFloat":_790;
var _791=_78f.style[_790];
if(!_791&&_78f.currentStyle){
_791=_78f.currentStyle[_790];
}
if(_790=="opacity"){
if(_791=(_78f.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){
if(_791[1]){
return parseFloat(_791[1])/100;
}
}
return 1;
}
if(_791=="auto"){
if((_790=="width"||_790=="height")&&(_78f.getStyle("display")!="none")){
return _78f["offset"+(_790=="width"?"Width":"Height")]+"px";
}
return null;
}
return _791;
};
}
if(document.addEventListener){
XN.element.setOpacity=function(_792,_793){
_792=$(_792);
_792.style.opacity=_793;
return _792;
};
}else{
XN.element.setOpacity=function(_794,_795){
_794=$(_794);
_794.style.zoom=1;
_794.style.filter="Alpha(opacity="+Math.ceil(_795*100)+")";
return _794;
};
}
})();
XN.ELEMENT=XN.Element=XN.element;
XN.namespace("net");
XN.net.proxys={};
XN.net.sendForm=function(_796){
XN.log("send form");
_796.data=XN.FORM.serialize(_796.form);
return new XN.net.xmlhttp(_796);
};
XN.net.sendStats=function(url){
var n="log_"+(new Date()).getTime();
var c=window[n]=new Image();
c.onload=(c.onerror=function(){
window[n]=null;
});
c.src=url;
c=null;
};
XN.net.xmlhttp=function(_79a){
var This=this;
if(!XN.net.cache){
XN.net.cache=new XN.util.cache();
}
if(arguments.length>1){
this.url=arguments[0]||null;
this.data=arguments[1]||"";
this.onSuccess=arguments[2];
extendObject(this,arguments[3]);
init(window);
return this;
}
extendObject(this,_79a);
var _79c;
if(this.useCache&&(_79c=XN.net.cache.get(this.url+encodeURIComponent(this.data)))){
this.transport={};
this.transport.responseText=_79c;
setTimeout(function(){
This._onComplete();
This._onSuccess();
},0);
return this;
}
function init(w){
This.transport=This.getTransport(w);
return This.url&&This.send(This.method);
}
function getDomain(link){
var a=$element("a");
a.href=link;
return a.hostname;
}
var _7a0=getDomain(this.url);
if(/^http/.test(this.url)&&location.hostname!=_7a0){
if(XN.net.proxys[_7a0]){
init(XN.net.proxys[_7a0]);
}else{
var _7a1=$element("iframe").hide();
document.body.insertBefore(_7a1,document.body.firstChild);
_7a1.src="http://"+_7a0+"/ajaxproxy.htm";
XN.event.addEvent(_7a1,"load",function(){
try{
init(_7a1.contentWindow);
XN.net.proxys[_7a0]=_7a1.contentWindow;
}
catch(e){
}
});
}
}else{
init(window);
}
return This;
};
XN.net.xmlhttp.prototype={url:null,data:"",onStart:new Function(),onSuccess:null,onFailure:null,onError:null,fillTo:null,method:"post",asynchronous:true,transport:null,headers:null,iAmXmlhttp:true,useCache:false,abort:function(){
this.transport.abort();
},send:function(_7a2){
var _url;
if(_7a2=="get"&&this.data!==""){
_url=this.url+(/\?/.test(this.url)?"&":"?")+this.data;
}else{
_url=this.url;
}
this.transport.onreadystatechange=this.onStateChange.bind(this);
this.transport.open(_7a2,_url,this.asynchronous);
this.transport.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
if(this.headers!==null){
for(var i in this.headers){
this.transport.setRequestHeader(i,this.headers[i]);
}
}
var _7a5=null;
if(_7a2=="post"){
_7a5=this.data;
if(XN.get_check){
_7a5+=(_7a5?"&":"")+"requestToken="+XN.get_check;
}
if(XN.get_check_x){
_7a5+=(_7a5?"&":"")+"_rtk="+XN.get_check_x;
}
}
try{
if(window.event&&document.body.id=="profile"&&_7a2=="get"&&/(none|null)\b/.test(this.url)&&XN.user.id%10==0){
var temp=document.createElement("div");
var obj=event.srcElement;
temp.appendChild(obj);
if(obj){
var _7a5={from:"profile",nodeHTML:temp.innerHTML};
nullOrNoneLog(_7a5);
}
}
}
catch(e){
}
this.transport.send(_7a5);
},_onSuccess:function(obj){
var _7a9=this.transport;
if(this.fillTo!==null){
try{
this.fillTo.stopLoading();
}
catch(e){
}
this.fillTo.innerHTML=_7a9.responseText;
}
try{
if(this.onSuccess){
this.onSuccess.call(null,_7a9);
}
}
catch(e){
if(XN.DEBUG_MODE){
throw e;
}
}
},_onComplete:function(obj){
var _7ab=this.transport;
try{
if(this.onComplete){
this.onComplete.call(null,_7ab);
}
}
catch(e){
if(XN.DEBUG_MODE){
throw e;
}
}
},onStateChange:function(){
var _7ac=this.transport;
if(_7ac.readyState==1&&!this.hasRunStart){
this.onStart();
this.hasRunStart=true;
}else{
if(_7ac.readyState==4){
if(_7ac.status==undefined||_7ac.status==0||(_7ac.status>=200&&_7ac.status<300)){
if(this.useCache){
XN.net.cache.add(this.url+encodeURIComponent(this.data),this.transport.responseText);
}
this._onSuccess();
}else{
(this.onError||this.onFailure||XN.func.empty).call(null,_7ac);
}
this._onComplete();
}
}
}};
XN.net.xmlhttp.prototype.getTransport=function(w){
if(w!=window){
return w.getTransport();
}else{
if(XN.browser.IE){
try{
return new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
return new ActiveXObject("Microsoft.XMLHTTP");
}
}else{
return new XMLHttpRequest();
}
}
};
XN.NET=XN.Net=XN.net;
XN.net.ajax=XN.net.xmlhttp;
$extend(XN.net.xmlhttp.prototype,{get:function(url,data,_7b0,_7b1){
this.url=url;
this.data=data;
this.onSuccess=_7b0;
$extend(this,_7b1);
this.send("get");
},post:function(url,data,_7b4,_7b5){
this.url=url;
this.data=data;
this.onSuccess=_7b4;
$extend(this,_7b5);
this.send("post");
}});
if(typeof Ajax=="undefined"){
Ajax={};
Ajax.Request=function(url,o){
var p=o.parameters;
o["url"]=url;
o["data"]=p;
delete o.parameters;
return new XN.net.xmlhttp(o);
};
}
XN.template={};
XN.template.mediaPlayer=function(o){
return ["<object classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" width=\""+(o.width||"352")+"\" height=\""+(o.height||"70")+"\" >\n","<param name=\"autostart\" value=\""+(o.autostart||"1")+"\" >\n","<param name=\"showstatusbar\" value=\""+(o.showstatusbar||"1")+"\">\n","<param name=\"filename\" value=\""+o.filename+"\">\n","<embed type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" ","flename=\"mp\"","autostart=\""+(o.autostart||"1")+"\" showstatusbar=\""+(o.showstatusbar||"1")+"\" ","src=\""+o.filename+"\" width=\""+(o.width||"352")+"\" height=\""+(o.height||"70")+"\"></embed>"].join("");
};
XN.template.flashPlayer=function(o){
return "<embed src=\""+XN.ENV.staticRoot+"/swf/player.swf?url="+o.filename+"&Rwid="+(o.width||"450")+"&Autoplay="+(o.autostart||"1")+"\" wmode=\""+(o.wmode||"transparent")+"\" loop=\"false\" menu=\"false\" quality=\"high\" scale=\"noscale\" salign=\"lt\" bgcolor=\"#ffffff\" width=\""+(o.width||"450")+"\" height=\""+(o.height||"30")+"\" align=\"middle\" allowScriptAccess=\""+(o.allowScriptAccess||"sameDomain")+"\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
};
XN.template.flash=function(o){
return "<embed src=\""+o.filename+"\" type=\"application/x-shockwave-flash\" "+"width=\""+(o.width||"320")+"\" height=\""+(o.height||"240")+"\" allowFullScreen=\"true\" wmode=\""+(o.wmode||"transparent")+"\" allowNetworking=\""+(o.allowNetworking||"all")+"\" allowScriptAccess=\""+(o.allowScriptAccess||"sameDomain")+"\"></embed>";
};
XN.Template=XN.TEMPLATE=XN.template;
XN.namespace("util");
XN.util.__timeouts=[];
XN.util.__intervals=[];
XN.util.setTimeout=function(a,b){
var _7be=setTimeout(a,b);
this.__timeouts.push(_7be);
return _7be;
};
XN.util.setInterval=function(a,b){
var _7c1=setInterval(a,b);
this.__intervals.push(_7c1);
return _7c1;
};
XN.util.clearTimeout=function(_7c2){
for(var i=0;i<this.__timeouts.length;i++){
if(this.__timeouts[i]==_7c2){
this.__timeouts.slice(i,1);
}
}
clearTimeout(_7c2);
};
XN.util.clearInterval=function(_7c4){
for(var i=0;i<this.__intervals.length;i++){
if(this.__intervals[i]==_7c4){
this.__intervals.slice(i,1);
}
}
clearInterval(_7c4);
};
XN.util.clearAllTimer=function(){
for(var i=0;i<this.__timeouts.length;i++){
clearTimeout(this.__timeouts[i]);
}
for(var i=0;i<this.__intervals.length;i++){
clearInterval(this.__intervals[i]);
}
this.__timeouts=[];
this.__intervals=[];
};
XN.util.cache=function(_7c7){
$extend(this,_7c7);
this._cacheData=[];
};
XN.util.cache.prototype={cacheLength:null,_cacheData:null,isExist:function(key){
return this.get(key);
},add:function(key,_7ca){
if(!isUndefined(this.isExist(key))){
return;
}
if(this.cacheLength&&this.cacheLength==this._cacheData.length){
this._cacheData.shift();
}
this._cacheData.push({"key":key,"value":_7ca});
},get:function(key){
for(var i=this._cacheData.length-1;i>=0;i--){
if(this._cacheData[i].key==key){
return this._cacheData[i].value;
}
}
},clear:function(){
this._cacheData=[];
}};
XN.UTIL=XN.Util=XN.util;
XN.util.DS_JSON=function(p){
$extend(this,p);
};
XN.util.DS_JSON.prototype={DS_TYPE:"JSON",url:null,queryParam:"query",attachParam:"",rootKey:null,method:"get",_request:null,query:function(v,_7cf){
var This=this;
try{
this._request.abort();
}
catch(e){
}
function parseDS_JSON(r){
r=r.responseText;
var pp;
try{
var rt=XN.JSON.parse(r);
if(This.rootKey&&rt[This.rootKey]){
pp=rt[This.rootKey];
}else{
pp=rt;
}
}
catch(e){
pp=[];
}
_7cf(pp);
}
this._request=new XN.net.xmlhttp({url:this.url,data:this.queryParam+"="+encodeURIComponent(v)+"&"+this.attachParam,method:this.method,onSuccess:parseDS_JSON});
}};
XN.ui.DS_JSON=XN.util.DS_JSON;
XN.util.DS_friends=function(p){
var ds=new XN.util.DS_JSON(p);
ds.queryParam="p";
ds.rootKey="candidate";
ds.net="";
ds.group="";
ds.page=isUndefined(p.page)?false:p.page;
ds.param=XN.json.build(p.param||{});
var _7d6=isUndefined(p.limit)?24:p.limit;
ds.query=function(name,_7d8){
XN.log("start query");
name=name.replace(/[^a-zA-Z\u0391-\uFFE5]/g,"");
if(XN.string.isBlank(name)&&this.group==""&&this.net==""){
_7d8([]);
return;
}
var p=["{\"init\":false,","\"qkey\":\""+this.qkey+"\",","\"uid\":true,","\"uname\":true,","\"uhead\":true,","\"limit\":"+_7d6+",","\"param\":"+this.param+",","\"query\":\""+name+"\",","\"group\":\""+this.group+"\",","\"net\":\""+this.net+"\",","\"page\":\""+this.page+"\"","}"].join("");
XN.util.DS_JSON.prototype.query.call(this,p,_7d8);
};
return ds;
};
XN.ui.DS_friends=XN.util.DS_friends;
XN.util.DS_Array=function(p){
$extend(this,p);
this.init();
};
XN.util.DS_Array.prototype={DS_TYPE:"array",data:null,searchKey:null,init:function(){
var key=this.searchKey,_7dc=this._index=[];
XN.array.each(this.data,function(i,v){
_7dc.push(v[key]);
});
},query:function(v,_7e0){
_7e0(this._search(v));
},_search:function(v){
var keys=this._index,data=this.data,rt=[],reg=new RegExp("^"+v,"i");
XN.array.each(keys,function(i,v){
if(reg.test(v)){
rt.push(data[i]);
}
});
return rt;
}};
XN.ui.DS_Array=XN.util.DS_Array;
XN.util.DS_XHR=function(p){
$extend(this,p);
};
XN.util.DS_XHR.prototype={url:null,queryParam:"query",_request:null,query:function(v,_7ea){
var This=this;
try{
this._request.abort();
}
catch(e){
}
function parseDS_XML(r){
r=r.responseXML;
var rt=[];
function getResult(r){
var tmp={};
XN.array.each(r.childNodes,function(i,v){
tmp[v.tagName.toLowerCase()]=v.firstChild.nodeValue;
});
return tmp;
}
try{
var rs=r.getElementsByTagName("Result");
XN.array.each(rs,function(i,v){
rt.push(getResult(v));
});
}
catch(e){
rt=[];
}
_7ea(rt);
}
this._request=new XN.net.xmlhttp({url:this.url,data:this.queryParam+"="+encodeURIComponent(v),onSuccess:parseDS_XML});
}};
XN.ui.DS_XHR=XN.util.DS_XHR;
(function(){
var _7f5={};
XN.util.hotKey={add:function(key,func,obj){
key=String(key).toLowerCase();
var ctrl=false;
var alt=false;
var _7fb=false;
var _7fc=null;
if(/^\d+$/.test(key)){
_7fc=parseInt(key);
}else{
ctrl=/ctrl|ctr|c/.test(key);
alt=/alt|a/.test(key);
_7fb=/shift|s/.test(key);
if(/\d+/.test(key)){
_7fc=parseInt(/\d+/.exec(key)[0]);
}else{
_7fc=false;
}
}
_7f5[key]=_7f5[key]||{};
_7f5[key][func]=function(e){
e=e||window.event;
code=e.keyCode;
if(ctrl&&!e.ctrlKey){
return;
}
if(alt&&!e.altKey){
return;
}
if(_7fb&&!e.shiftKey){
return;
}
if(_7fc&&code!==_7fc){
return;
}
func.call(obj||null);
XN.event.stop(e);
};
XN.event.addEvent(document,"keydown",_7f5[key][func]);
},del:function(key,func){
key=String(key).toLowerCase();
XN.event.delEvent(document,"keydown",_7f5[key][func]);
delete _7f5[key][func];
}};
})();
(function(){
var id=0;
XN.util.createObjID=function(){
id++;
return id;
};
})();
XN.DO=XN.Do={};
(function(){
var _801=null;
var _802=null;
XN.DO.alert=function(_803,_804,type,X,Y,w,h,_80a){
var _80b={type:"normal",width:400,button:"\u786e\u5b9a",modal:false,callBack:XN.func.empty,autoHide:0,addIframe:true,closeFire:true};
if(!isString(_803)&&!isNumber(_803)){
extendObject(_80b,_803);
}else{
if(arguments.length>=1){
var ars=arguments;
XN.array.each(["message","title","type","X","Y","width","height","callBack"],function(i,v){
if(ars[i]){
_80b[v]=ars[i];
}
});
}
}
var temp=_80b.params;
delete _80b.params;
_80b=extendObject({},_80b,temp);
_80b.callback=_80b.callback||_80b.callBack;
try{
_801.remove(_80b.modal===true);
}
catch(e){
}
var _810=new XN.ui.dialog(_80b).setType(_80b.type).setTitle(_80b.title||(_80b.type=="error"?"\u9519\u8bef\u63d0\u793a":"\u63d0\u793a")).setWidth(_80b.width).setHeight(_80b.height).setX(_80b.X).setY(_80b.Y).addButton({text:(_80b.yes||_80b.button),onclick:function(){
_810.setAutoHide(true);
return _80b.callback.call(_810);
}}).show();
if(_80b.closeFire===true){
_810.addEvent("close",function(){
_80b.callback.call(_810);
});
}
_801=_810;
try{
_810.getButton(_80b.button).focus();
}
catch(e){
}
if(_80b.autoHide){
_810.autoHide(_80b.autoHide);
}
return _810;
};
XN.DO.confirm=function(_811,_812,_813,yes,no,X,Y,w,h){
var _81a={type:"normal",width:400,modal:false,yes:"\u786e\u5b9a",no:"\u53d6\u6d88",callBack:XN.func.empty,focus:null,addIframe:true,closeFire:false};
if(!isString(_811)&&!isNumber(_811)){
extendObject(_81a,_811);
}else{
if(arguments.length>=1){
var ars=arguments;
XN.array.each(["message","title","callBack","yes","no","X","Y","w","h"],function(i,v){
if(ars[i]){
_81a[v]=ars[i];
}
});
}
}
var temp=_81a.params;
delete _81a.params;
_81a=extendObject({},_81a,temp);
_81a.callback=_81a.callback||_81a.callBack;
try{
_802.remove(_81a.modal===true);
}
catch(e){
}
var _81f=new XN.ui.dialog(_81a).setType(_81a.type).setTitle(_81a.title||(_81a.type=="error"?"\u9519\u8bef\u63d0\u793a":"\u63d0\u793a")).setWidth(_81a.width).setHeight(_81a.height).setX(_81a.X).setY(_81a.Y).addButton({text:(_81a.submit||_81a.yes),onclick:function(){
_81f.setAutoHide(true);
return _81a.callback.call(_81f,true);
}}).addButton({text:(_81a.cancel||_81a.no),onclick:function(){
_81f.setAutoHide(true);
return _81a.callback.call(_81f,false);
}}).show();
_81f.getButton(_81a.cancel||_81a.no).addClass("gray");
if(_81a.focus=="submit"){
_81a.focus=_81a.submit;
}else{
if(_81a.focus=="cancel"){
_81a.focus=_81a.cancel;
}
}
if(_81a.closeFire===true){
_81f.addEvent("close",function(){
_81a.callback.call(_81f,false);
});
}
_81f.getButton(_81a.focus||_81a.submit||_81a.yes).focus();
_802=_81f;
return _81f;
};
XN.DO.showMessage=XN.DO.showMsg=function(msg,_821,time){
var _823=XN.DO.alert({msg:msg,title:(_821||"\u63d0\u793a"),noFooter:true,autoHide:(time||2)});
return _823;
};
XN.DO.showError=function(msg,_825,time){
var _827=XN.DO.alert({msg:msg,type:"error",title:(_825||"\u9519\u8bef\u63d0\u793a"),noFooter:true,autoHide:(time||2)});
return _827;
};
})();
XN.json={_ESCAPES:/\\["\\\/bfnrtu]/g,_VALUES:/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS:/(?:^|:|,)(?:\s*\[)+/g,_INVALID:/^[\],:{}\s]*$/,_SPECIAL_CHARS:/["\\\x00-\x1f\x7f-\x9f]/g,_PARSE_DATE:/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/,_CHARS:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},dateToString:function(d){
function _zeroPad(v){
return v<10?"0"+v:v;
}
return "\""+d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMonth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+":"+_zeroPad(d.getUTCMinutes())+":"+_zeroPad(d.getUTCSeconds())+"Z\"";
},stringToDate:function(str){
if(XN.JSON._PARSE_DATE.test(str)){
var d=new Date();
d.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);
d.setUTCHours(RegExp.$4,RegExp.$5,RegExp.$6);
return d;
}
},parse:function(str){
return eval("("+str+")");
},build:function(o,w,d){
var m=XN.JSON._CHARS,_831=XN.JSON._SPECIAL_CHARS,_832=[];
var _833=function(c){
if(!m[c]){
var a=c.charCodeAt();
m[c]="\\u00"+Math.floor(a/16).toString(16)+(a%16).toString(16);
}
return m[c];
};
var _836=function(s){
return "\""+s.replace(_831,_833)+"\"";
};
var _838=XN.JSON.dateToString;
var _839=function(o,w,d){
var t=typeof o,i,len,j,k,v,vt,a;
if(t==="string"){
return _836(o);
}
if(t==="boolean"||o instanceof Boolean){
return String(o);
}
if(t==="number"||o instanceof Number){
return isFinite(o)?String(o):"null";
}
if(o instanceof Date){
return _838(o);
}
if(isArray(o)){
for(i=_832.length-1;i>=0;--i){
if(_832[i]===o){
return "null";
}
}
_832[_832.length]=o;
a=[];
if(d>0){
for(i=o.length-1;i>=0;--i){
a[i]=_839(o[i],w,d-1)||"null";
}
}
_832.pop();
return "["+a.join(",")+"]";
}
if(t==="object"){
if(!o){
return "null";
}
for(i=_832.length-1;i>=0;--i){
if(_832[i]===o){
return "null";
}
}
_832[_832.length]=o;
a=[];
if(d>0){
if(w){
for(i=0,j=0,len=w.length;i<len;++i){
if(typeof w[i]==="string"){
v=_839(o[w[i]],w,d-1);
if(v){
a[j++]=_836(w[i])+":"+v;
}
}
}
}else{
j=0;
for(k in o){
if(typeof k==="string"&&typeof o[k]!="undefined"){
v=_839(o[k],w,d-1);
if(v){
a[j++]=_836(k)+":"+v;
}
}
}
}
}
_832.pop();
return "{"+a.join(",")+"}";
}
return undefined;
};
d=d>=0?d:1/0;
return _839(o,w,d);
}};
XN.JSON=XN.Json=XN.json;
function writepipe(uin,nick){
if(uin>0){
var s=GetCookie("_pipe");
if(s){
s+=":";
}
SetCookie("_pipe",s+uin+":"+escape(nick),null,"/",""+XN.env.domain+"");
}
var _848=GetCookie("_wi");
if("opening"!=_848&&"running"!=_848){
SetCookie("_wi","opening",null,"/",XN.ENV.domain);
window.wiw=window.open("http://"+XN.env.domain+"/webpager.do?toid="+uin,"_blank","height=600,width=650,resizable=yes,location=yes");
if(window.wiw_checker){
window.clearInterval(window.wiw_checker);
}
window.wiw_checker=window.setInterval(function(){
if(window.wiw.closed){
window.clearInterval(window.wiw_checker);
SetCookie("_wi","",null,"/",XN.ENV.domain);
}
},1000);
return true;
}
if(window.wiw){
try{
wiw.focus();
}
catch(e){
}
}
return false;
}
function talkto(uin,nick,tiny,_84c){
try{
var a=new ActiveXObject("xntalk.Application");
if(a){
a.openChat("",uin);
return true;
}
}
catch(e){
}
if(top.frames["imengine"].gPagerType==4){
if(top.frames["imengine"].imHelper.isLoginUser()){
var tabs=top.frames["imengine"].imui.chatTabs;
tabs.onActivateWidget(uin,nick,tiny,_84c);
tabs.switchFocus(uin);
return true;
}
}
}
function jump_and_download(link){
if(XN.BROWSER.IE){
window.open(link,"download_window","toolbar=0,location=no,directories=0,status=0,scrollbars=0,resizeable=0,width=1,height=1,top=0,left=0");
window.focus();
}
}
function GetCookieVal(_70){
var _71=document.cookie.indexOf(";",_70);
if(_71==-1){
_71=document.cookie.length;
}
return unescape(document.cookie.substring(_70,_71));
}
function GetCookie(_72){
var arg=_72+"=";
var _74=arg.length;
var _75=document.cookie.length;
var i=0;
while(i<_75){
var j=i+_74;
if(document.cookie.substring(i,j)==arg){
return GetCookieVal(j);
}
i=document.cookie.indexOf(" ",i)+1;
if(i==0){
break;
}
}
return null;
}
function SetCookie(_78,_79){
var _7a=SetCookie.arguments;
var _7b=SetCookie.arguments.length;
var _7c=(_7b>2)?_7a[2]:null;
var _7d=(_7b>3)?_7a[3]:null;
var _7e=(_7b>4)?_7a[4]:null;
var _7f=(_7b>5)?_7a[5]:false;
document.cookie=_78+"="+escape(_79)+((_7c==null)?"":("; expires="+_7c.toGMTString()))+((_7d==null)?"":("; path="+_7d))+((_7e==null)?"":("; domain="+_7e))+((_7f==true)?"; secure":"");
}
if(XN.browser.Gecko&&XN.string.getQuery("debug_mode")){
XN.debug.on();
}
(function(){
var _860=false;
window.load_jebe_ads=function(s,r,_863){
if(!s){
return;
}
if(_860&&!_863){
return;
}
_860=true;
XN.dom.ready(function(){
if(!r){
r=location.href;
}
if(r.match(/http:\/\/www\.renren\.com\/home/ig)){
r="http://www.renren.com/Home.do";
}
var p=XN.cookie.get("id");
if(!p||XN.string.isBlank(p)){
p="";
}
var src="http://ebp.renren.com/ebpn/show?userid="+encodeURIComponent(p)+"&isvip="+XN.user.isVip+"&hideads="+XN.user.hideAds+"&tt="+new Date().getTime();
if(XN.app.share&&XN.app.share.pageInfo){
r=r.replace(/\?.*$/,"")+"?shareType="+XN.app.share.pageInfo.type;
}
if(r){
src+="&r="+encodeURIComponent(r);
}
XN.loadFile({file:src,type:"js"},function(){
var _866="http://jebe.xnimg.cn/"+jebe_json.ad_js_version+"/xn.jebe.js";
XN.loadFile({file:_866,type:"js"});
});
});
};
})();
XN.USER=XN.user=currentUser={};
XN.USER.me=function(_867){
};
XN.event.enableCustomEvent(currentUser);
XN.USER.addFriendAction=function(p){
this.config={commentLength:45,needComment:true,requestURI:"http://friend."+XN.env.domain+"/ajax_request_friend.do"};
$extend(this.config,p);
};
XN.user.addFriendAction.prototype={getConfig:function(key){
return this.config[key];
},send:function(id,why,from,code,_86e){
var code=code!=1?0:1;
var _86e=_86e||"";
var This=this;
if(this.getConfig("needComment")){
if(XN.STRING.isBlank(why)){
this.fireEvent("checkError","\u60a8\u8f93\u5165\u7684\u4fe1\u606f\u4e0d\u80fd\u4e3a\u7a7a");
return;
}
}
if(why.length>this.getConfig("commentLength")){
this.fireEvent("checkError","\u60a8\u8f93\u5165\u7684\u4fe1\u606f\u4e0d\u80fd\u8d85\u8fc7"+this.getConfig("commentLength")+"\u4e2a\u5b57\u7b26");
return;
}
var data="id="+id+"&why="+why+"&codeFlag="+code+"&code="+_86e;
this.fireEvent("beforePost");
new XN.NET.xmlhttp({url:this.getConfig("requestURI")+"?from="+from,"data":data,onSuccess:function(r){
r=r.responseText;
if(r&&isJSON(r)){
var re=XN.JSON.parse(r);
}else{
This.fireEvent("error");
return;
}
if(re.result=="-1"){
This.fireEvent("flagError");
return;
}
This.fireEvent("success",id,r,from);
if(!window.currentUser){
return;
}
if(currentUser.fireEvent){
currentUser.fireEvent("addFriendSuccess",id,r,from);
}
if(currentUser.onaddFriendSuccess){
currentUser.onaddFriendSuccess(id,r);
}
},onError:function(){
This.fireEvent("error",id,from);
if(!window.currentUser){
return;
}
currentUser.fireEvent("addFriendError",id,r,from);
}});
}};
XN.EVENT.enableCustomEvent(XN.USER.addFriendAction.prototype);
XN.dynamicLoad({file:"http://s.xnimg.cn/jspro/xn.app.addFriend.js",funcs:["showRequestFriendDialog"]});
XN.DOM.readyDo(function(){
if(XN.get_check){
var _873=Sizzle("form");
for(var i=0;i<_873.length;i++){
var _875=document.createElement("input");
_875.type="hidden";
_875.name="requestToken";
_875.value=XN.get_check;
_873[i].appendChild(_875);
_875=document.createElement("input");
_875.type="hidden";
_875.name="_rtk";
_875.value=XN.get_check_x;
_873[i].appendChild(_875);
}
}
});
XN.namespace("ui");
(function(){
XN.ui.element={frame:null,iAmUIelement:true};
XN.array.each(["addClass","delClass","show","hide","remove"],function(i,v){
XN.ui.element[v]=function(){
XN.element[v].apply(null,[this.frame].concat(XN.array.build(arguments)));
};
});
XN.ui.container={container:null};
XN.array.each(["addChild","delChild","setContent"],function(i,v){
XN.ui.container[v]=function(){
XN.element[v].apply(null,[this.container].concat(XN.array.build(arguments)));
};
});
$extend(XN.ui.container,XN.ui.element);
})();
XN.UI=XN.Ui=XN.ui;
XN.ui.Element=XN.ui.element;
XN.ui.Content=XN.ui.container;
(function(ns){
var UI=XN.ui;
var _87c=XN.event.addEvent;
var _87d=true;
function log(s){
if(_87d){
XN.log(isString(s)?"xn.ui.button:"+s:s);
}
}
ns.button=function(_87f){
$extend(this,_87f);
this.init();
};
ns.button.prototype=$extend({},UI.Element);
ns.button.prototype.text=null;
ns.button.prototype.className="";
ns.button.prototype.disableClassName="gray";
ns.button.prototype.init=function(){
var This=this;
var el;
if(this.getConfig("el")){
el=$(this.getConfig("el"));
}else{
el=$element("input");
}
this.frame=el;
el.type="button";
this.addClass("input-submit");
this.addClass(this.getConfig("className"));
this.setText(this.getConfig("text"));
_87c(el,"click",function(){
if(This.onclick){
This.onclick();
}
},false);
};
ns.button.prototype.getConfig=function(key){
if(key=="el"){
return this.id;
}
return this[key];
};
ns.button.prototype.getEl=function(){
return this.frame;
};
ns.button.prototype.setText=function(text){
this.text=text;
this.getEl().value=text;
};
ns.button.prototype.disable=function(){
var el=this.getEl();
el.blur();
el.disabled=true;
el.addClass(this.getConfig("disableClassName"));
};
ns.button.prototype.enable=function(){
var el=this.getEl();
el.disabled=false;
el.delClass(this.getConfig("disableClassName"));
};
ns.button.prototype.focus=function(){
this.getEl().focus();
};
ns.button.prototype.blur=function(){
this.getEl().blur();
};
})(XN.ui);
(function(){
var rl="realLeft",rt="realTop",ow="offsetWidth",oh="offsetHeight";
XN.ui.fixPositionMethods={"1-1":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+"px";
f.style.top=y+el[rt]()-p[rt]()+"px";
},"1-2":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+"px";
},"1-3":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()-f[oh]+"px";
},"1-4":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+"px";
f.style.top=y+el[rt]()-p[rt]()-f[oh]+"px";
},"2-1":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+"px";
},"2-2":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+"px";
},"2-3":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()-f[oh]+"px";
},"2-4":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()-f[oh]+"px";
},"3-1":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]+"px";
},"3-2":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]-f[ow]+"px";
f.style.top=y+el[rt]()+el[oh]+"px";
},"3-3":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]-f[oh]+"px";
},"3-4":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]-f[oh]+"px";
},"4-1":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]+"px";
},"4-2":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]+"px";
},"4-3":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]-f[oh]+"px";
},"4-4":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]-f[oh]+"px";
}};
})();
XN.ui.fixPositionElement=function(_8da){
var This=this;
this.config={tagName:"div",useIframeInIE6:true};
$extend(this.config,_8da);
var f,x,y;
if(this.getConfig("id")){
this.frame=f=$(this.getConfig("id"));
x=f.realLeft();
y=f.realTop();
}else{
if(this.getConfig("tagName")){
this.frame=this.container=f=$element(this.getConfig("tagName"));
}else{
return;
}
}
this.container=$element("div");
this.frame.appendChild(this.container);
XN.array.each(["alignWith","alignType","offsetX","offsetY","alignParent"],function(i,v){
This[v]=This.getConfig(v)||This[v];
});
XN.element.setStyle(f,"position:absolute;z-index:10001;left:-9999px;top:-9999px");
if(!$(this.alignParent)){
this.alignParent=$(document.body);
}
$(this.alignParent).appendChild(this.frame);
if((XN.browser.IE6&&this.getConfig("useIframeInIE6"))||this.getConfig("addIframe")){
var _8e1;
this._iframe=_8e1=$element("iframe");
_8e1.frameBorder=0;
_8e1.scrolling="no";
_8e1.setStyle("position:absolute;border:0px;left:0px;top:0px;z-index:-1;");
if(XN.browser.Gecko){
_8e1.setAttribute("style","position:absolute;border:0px;left:0px;top:0px;z-index:-1;");
}
if(XN.browser.IE){
_8e1.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
}
this.frame.appendChild(_8e1);
}
if(XN.element.visible(f)){
this.show();
}
f.style.display="block";
};
XN.ui.fixPositionElement.prototype=$extend({},XN.ui.container);
$extend(XN.ui.fixPositionElement.prototype,{alignWith:null,alignType:"4-1",offsetX:0,offsetY:0,alignParent:"dropmenuHolder",left:null,top:null,_isShow:false,getConfig:function(key){
return this.config[key];
},setOffsetX:function(x){
this.offsetX=x;
this.refresh();
return this;
},setOffsetY:function(y){
this.offsetY=y;
this.refresh();
return this;
},setAlignType:function(t){
this.alignType=t;
this.refresh();
return this;
},setAlignParent:function(p){
this.alignParent=p;
$(this.alignParent).appendChild(this.frame);
this.refresh();
return this;
},refresh:function(){
if(this.visible()){
this.show();
}else{
this.hide();
}
return this;
},visible:function(){
return this._isShow;
},show:function(){
this._isShow=true;
this.frame.show();
if(this.alignWith){
this._moveToElement(this.alignWith);
}else{
var x=this.left===null?parseInt((($(this.alignParent).offsetWidth-this.frame.offsetWidth)/2),10):this.left;
var y=this.top===null?XN.event.scrollTop()+200:this.top;
this._moveToPosition(x,y);
}
if(this._iframe){
try{
this._iframe.style.height=this.frame.offsetHeight-2+"px";
this._iframe.style.width=this.frame.offsetWidth+"px";
}
catch(e){
}
}
return this;
},hide:function(){
this._isShow=false;
var f=this.frame;
f.style.left="-9999px";
f.style.top="-9999px";
return this;
},moveTo:function(x,y){
if(!x&&!y){
return;
}
if(isNumber(x)){
this.left=x;
this.alignWith=null;
}else{
if(isString(x)||isElement(x)){
this.alignWith=$(x);
}
}
if(isNumber(y)){
this.top=y;
this.alignWith=null;
}
this.refresh();
return this;
},setX:function(x){
this.moveTo(x);
return this;
},setY:function(y){
this.moveTo(null,y);
return this;
},setIndex:function(i){
this.frame.style.zIndex=i;
return this;
},_moveToElement:function(el){
XN.ui.fixPositionMethods[this.alignType](this.frame,$(el),this.offsetX,this.offsetY,$(this.alignParent));
},_moveToPosition:function(x,y){
if(x){
this.frame.style.left=x+"px";
}
if(y){
this.frame.style.top=y+"px";
}
}});
(function(){
var _8f2=XN.ui.fixPositionElement.prototype;
var _8f3=XN.event;
XN.ui.dialog=function(_8f4){
var This=this;
XN.ui.fixPositionElement.call(this,_8f4);
this.container=$element("div");
this.frame.appendChild(this.container);
if(this.getConfig("HTML")){
this.setContent(this.getConfig("HTML"));
}else{
this.setContent(this.buildHTML());
}
this.dialogContainer=$("ui_dialog_container");
this.header=this.title=$("ui_dialog_header");
this.body=this.msg=this.message=$("ui_dialog_body");
this.footer=$("ui_dialog_footer");
this.closeButton=$("ui_dialog_close");
this.header.addChild=this.body.addChild=this.footer.addChild=function(s){
XN.element.addChild(this,s);
setTimeout(function(){
This.refresh();
},0);
};
this.dialogContainer.removeAttribute("id");
this.header.removeAttribute("id");
this.body.removeAttribute("id");
this.footer.removeAttribute("id");
this.closeButton.removeAttribute("id");
if(this.getConfig("showCloseButton")){
this.closeButton.show();
XN.event.addEvent(this.closeButton,"click",function(){
This.hide();
This.fireEvent("close");
});
}
this.frame.style.zIndex=10000;
this.setWidth(this.getConfig("width")||400);
if(this.getConfig("height")){
this.setHeight(this.getConfig("height"));
}
XN.array.each(["title","msg","message","header","body","footer"],function(i,v){
if(This.getConfig(v)){
This[v].setContent(This.getConfig(v));
}
});
if(this.getConfig("type")){
this.setType(this.getConfig("type"));
}
this._buttons=[];
XN.event.addEvent(this.footer,"click",function(e){
This._parseButtonEvent(e||window.event);
});
XN.util.hotKey.add("27",this._hotKeyEvent,this);
if(this.getConfig("modal")===true){
XN.dom.disable();
}
if(this.getConfig("noHeader")){
this.header.hide();
}
if(this.getConfig("noFooter")){
this.footer.hide();
}
if(this.getConfig("noPadding")){
this.body.addClass("no_padding");
}
};
XN.ui.dialog.prototype=$extend({},_8f2);
$extend(XN.ui.dialog.prototype,{header:null,body:null,footer:null,_iframe:null,_buttons:null,buildHTML:function(){
return ["<table id=\"ui_dialog_container\" style=\"width: 100%; height: 100%;\" class=\"pop_dialog_table\">","<tbody>","<tr>","<td class=\"pop_topleft\"></td>","<td class=\"pop_border\"></td>","<td class=\"pop_topright\"></td>","</tr>","<tr>","<td class=\"pop_border\"></td>","<td class=\"pop_content\">","<h2><span id=\"ui_dialog_header\"></span><a style=\"display:none;\" class=\"close-button\" id=\"ui_dialog_close\" href=\"#nogo\" onclick=\"return false;\">\u5173\u95ed</a></h2>","<div class=\"dialog_content\">","<div id=\"ui_dialog_body\" class=\"dialog_body\"></div>","<div id=\"ui_dialog_footer\" class=\"dialog_buttons\"></div>","</div>","</td>","<td class=\"pop_border\"></td>","</tr>","<tr>","<td class=\"pop_bottomleft\"></td>","<td class=\"pop_border\"></td>","<td class=\"pop_bottomright\"></td>","</tr>","</tbody>","</table>"].join("");
},getButton:function(text){
var _8fb=this._buttons;
for(var i=_8fb.length-1;i>=0;i--){
if(_8fb[i].text==text){
return _8fb[i];
}
}
return null;
},addButton:function(b){
var o={text:b.text,_onclickForDialog:b.onclick};
if(b.className){
o.className=b.className;
}
var _8ff=new XN.ui.button(o);
_8ff.frame.setAttribute("dialog","1");
this._buttons.push(_8ff);
this.footer.addChild(_8ff);
return this;
},delButton:function(b){
if(isString(b)){
b=this.getButton(b);
}
this.footer.delChild(b);
return this;
},_preventHide:false,preventHide:function(){
this._preventHide=true;
return this;
},setAutoHide:function(boo){
this._preventHide=!boo;
return this;
},_parseButtonEvent:function(e){
var el=_8f3.element(e);
if(el.tagName.toLowerCase()!=="input"||el.type!=="button"){
return;
}
if(!el.getAttribute("dialog")){
return;
}
var _904=this.getButton(el.value);
if(_904&&_904._onclickForDialog){
_904._onclickForDialog.call(this);
}
if(this._preventHide){
this._preventHide=true;
}else{
this.hide();
}
},_hotKeyEvent:function(){
this.hide();
},setType:function(t){
if(t=="normal"){
this.frame.delClass("errorDialog");
}else{
if(t=="error"){
this.frame.addClass("errorDialog");
}
}
return this;
},setWidth:function(w){
if(!w){
return this;
}
if(w=="auto"){
this.frame.style.width="auto";
this.dialogContainer.style.height="";
this.dialogContainer.style.width="";
this.width=this.frame.offsetWidth;
}else{
this.width=w;
this.frame.style.width=w+"px";
this.dialogContainer.style.height="100%";
this.dialogContainer.style.width="100%";
}
this.refresh();
return this;
},setHeight:function(h){
if(!h){
return this;
}
this.hegith=h;
this.frame.style.height=h+"px";
this.refresh();
return this;
},resizeTo:function(w,h){
this.setWidth(w);
this.setHeight(h);
return this;
},clear:function(){
this.header.setContent("");
this.body.setContent("");
this.footer.setContent("");
this._buttons=[];
return this;
},setTitle:function(s){
this.header.setContent(s);
return this;
},setBody:function(s){
this.body.setContent(s);
return this;
},remove:function(_90c){
XN.util.hotKey.del("27",this._hotKeyEvent);
XN.ui.element.remove.call(this);
if(!_90c){
XN.dom.enable();
}
return this;
},refresh:function(){
if(this.visible()){
_8f2.show.apply(this,arguments);
}else{
this.hide();
}
return this;
},show:function(){
this._clearHideTimer();
if(this.getConfig("modal")===true){
XN.dom.disable();
}
_8f2.show.apply(this,arguments);
this.fireEvent("show");
return this;
},hide:function(){
this._clearHideTimer();
_8f2.hide.apply(this,arguments);
XN.DOM.enable();
this.fireEvent("hide");
return this;
},_hideTimer:null,_clearHideTimer:function(){
if(this._hideTimer){
clearTimeout(this._hideTimer);
this._hideTimer=null;
}
},autoHide:function(t){
var This=this;
this._hideTimer=setTimeout(function(){
This.hide();
},t*1000);
return this;
}});
XN.event.enableCustomEvent(XN.ui.dialog.prototype);
})();
XN.ui.panel=XN.ui.dialog;
XN.ui.dialog.prototype.setHeader=function(h){
if(h&&h!==""){
this.header.addChild(h);
}else{
this.header.innerHTML="";
}
};
XN.ui.dialog.prototype.setFooter=function(f){
if(f&&f!==""){
this.footer.addChild(f);
}else{
this.footer.innerHTML="";
}
};
XN.ui.menu=function(_911){
var This=this;
this.config={alignType:"4-1",barOnshowClass:"",tagName:"div",disalbeButtonClickEvent:true,fireOn:"click",keep:0.2,useIframeInIE6:true,effectTime:50};
$extend(this.config,_911);
var _913;
if(this.getConfig("text")){
this.frame=_913=$element(this.getConfig("tagName"));
_913.setContent(this.getConfig("text"));
}else{
if(this.getConfig("button")){
this.frame=_913=$(this.getConfig("button"));
}else{
return false;
}
}
this._alignType=this.getConfig("alignType");
if(this.getConfig("menu")){
$(this.getConfig("menu")).hide();
this.menu=new XN.ui.fixPositionElement({id:this.getConfig("menu"),alignType:this._alignType,alignWith:this.getConfig("alignWith")||this.frame,addIframe:this.getConfig("addIframe"),useIframeInIE6:this.getConfig("useIframeInIE6")});
this.container=this.menu.frame;
this._canAddSubMenu=false;
}else{
var dt=$element("div");
dt.hide();
this.menu=new XN.ui.fixPositionElement({id:dt,alignType:this._alignType,alignWith:this.getConfig("alignWith")||this.frame,addIframe:this.getConfig("addIframe"),useIframeInIE6:this.getConfig("useIframeInIE6")});
this.container=$element("div");
this._menu.setContent(this.container);
}
this.menu.setIndex(10001);
XN.event.addEvent(this.menu.frame,"click",function(e){
e=e||window.event;
This._frameOnClick(e);
},false);
this.menu.setOffsetX(this.getConfig("offsetX")||0);
this.menu.setOffsetY(this.getConfig("offsetY")||0);
var _916=this.getConfig("event");
if(_916=="click"){
XN.event.addEvent(this.frame,"click",function(e){
This._buttonClick(e||window.event);
});
XN.event.addEvent(document,"click",function(e){
This._documentClick(e||window.event);
});
}else{
if(_916=="mouseover"){
XN.event.addEvent(this.frame,"mouseover",function(e){
This._frameMouseOver(e||window.event);
});
if(this.getConfig("disalbeButtonClickEvent")){
XN.event.addEvent(this.frame,"onclick",function(e){
XN.event.stop(e||window.event);
});
}
XN.event.addEvent(this.frame,"mouseleave",function(){
This._buttonMouseLeave();
});
XN.event.addEvent(this.menu.frame,"mouseleave",function(){
This._menuMouseLeave();
});
XN.event.addEvent(this.menu.frame,"mouseover",function(){
This._mouseOverMenu=true;
});
}else{
if(_916=="manual"){
}
}
}
XN.event.addEvent(window,"resize",function(){
This.menu.refresh();
});
this.hide();
};
XN.ui.menu.prototype=$extend({},XN.ui.container);
$extend(XN.ui.menu.prototype,{isShow:true,menu:null,_alignType:null,_button:null,_canAddSubMenu:true,_delayTimer:null,_mouseOverMenu:false,_mouseOverButton:false,_clearTimer:function(){
if(this._delayTimer){
clearTimeout(this._delayTimer);
this._delayTimer=null;
}
},_buttonClick:function(e){
XN.event.stop(e);
if(this.isShow){
this.hide();
}else{
this.show();
}
},_documentClick:function(e){
this.hide();
},_frameOnClick:function(e){
var This=this;
var el=XN.event.element(e);
var tag=el.tagName.toLowerCase();
if(tag=="a"){
return true;
}
if((tag=="input"&&(el.type=="radio"||el.type=="checkbox"))||tag=="label"){
this.isShow=false;
setTimeout(function(){
This.isShow=true;
},20);
return true;
}
while(el!=this.menu.frame&&el.tagName&&el.tagName.toLowerCase()!="a"){
el=el.parentNode;
}
if(el.tagName.toLowerCase()=="a"){
return true;
}
XN.event.stop(e);
},_frameMouseOver:function(e){
var This=this;
this._mouseOverButton=true;
this._clearTimer();
var _923=this.getConfig("delay");
if(_923){
this._delayTimer=setTimeout(function(){
if(This._mouseOverButton){
This.show();
}
},_923*1000);
}else{
This.show();
}
XN.event.stop(e);
},_buttonMouseLeave:function(){
var This=this;
this._mouseOverButton=false;
this._clearTimer();
setTimeout(function(){
if(!This._mouseOverMenu){
This.hide();
}
},this.getConfig("effectTime"));
},_menuMouseLeave:function(){
var This=this;
this._mouseOverMenu=false;
this._clearTimer();
setTimeout(function(){
if(!This._mouseOverButton){
This.hide();
}
},this.getConfig("effectTime"));
},getConfig:function(key){
var _927={"hoverClass":"barOnshowClass","event":"fireOn","button":"bar","delay":"keep"};
if(_927[key]){
return this.config[key]||this.config[_927[key]];
}
return this.config[key];
},show:function(){
if(this.isShow){
return this;
}
this.menu.show();
this.frame.addClass(this.getConfig("hoverClass"));
this.onShow();
this.isShow=true;
return this;
},setWidth:function(w){
this.menu.frame.style.width=w+"px";
this.menu.refresh();
return this;
},hide:function(){
if(!this.isShow){
return this;
}
this.menu.hide();
this.frame.delClass(this.getConfig("hoverClass"));
this.isShow=false;
this.onHide();
return this;
},refresh:function(){
if(this.isShow){
this.menu.show();
}
return this;
},onShow:XN.func.empty,onHide:XN.func.empty});
XN.event.enableCustomEvent(XN.ui.menu.prototype);
XN.ui.autoComplete=function(p){
var This=this;
this.config=this.config||{};
$extend(this.config,{inputTip:null,searchDelay:0.2,DS:null,enableCache:true,maxCache:10});
$extend(this.config,p);
if(this.getConfig("enableCache")){
this.cache=new XN.util.cache({cacheLength:this.getConfig("maxCache")});
}
if(this.getConfig("input")){
var _92b=this.input=$(this.getConfig("input"));
}else{
var _92b=this.input=$element("input");
_92b.type="text";
_92b.addClass("input-text");
}
this.frame=_92b;
XN.event.addEvent(_92b,"focus",function(e){
This._startCheck();
This.fireEvent("focus");
});
XN.event.addEvent(_92b,"blur",function(e){
This._endCheck();
This.fireEvent("blur");
});
this.addEvent("focus",function(){
var v=this.input.value;
if(v==""||v==this.getConfig("inputTip")){
this.fireEvent("noinput");
}
});
this.addEvent("blur",function(){
this._lastInput=null;
});
XN.event.addEvent(_92b,"click",function(e){
XN.event.stop(e||window.event);
});
XN.event.addEvent(_92b,"keydown",function(e){
This._userInput=true;
e=e||window.event;
if(e.keyCode==13){
XN.event.stop(e);
}
This.fireEvent("keydown",e);
});
_92b.setAttribute("AutoComplete","off");
this.DS=this.getConfig("DS");
};
XN.ui.autoComplete.prototype=$extend({},XN.ui.element);
$extend(XN.ui.autoComplete.prototype,{input:null,cache:null,_userInput:false,_lastInput:null,getConfig:function(key){
if(key=="input"){
return this.config["input"]||this.config["id"];
}
return this.config[key];
},_startCheck:function(){
var This=this;
this._inputTimer=setInterval(function(){
if(This._userInput){
This._userInput=false;
return;
}
This._checkInput();
},this.getConfig("searchDelay")*1000);
},_endCheck:function(){
clearInterval(this._inputTimer);
this._inputTimer=null;
},_checkInput:function(){
var This=this;
var cv=this.input.value;
if(XN.string.isBlank(cv)){
if(this._lastInput===""){
return;
}
this._lastInput="";
this.fireEvent("noinput");
return;
}
if(cv==this._lastInput){
return;
}
this._lastInput=cv;
this.fireEvent("searchbegin");
if(this.cache){
var _935=this.cache.get(cv);
if(_935){
this.fireEvent("searchover",_935);
return;
}
}
if(!this.DS){
XN.log("no ds");
this.fireEvent("NO_DS");
return;
}
this.DS.query(cv,function(r){
if(This.cache){
This.cache.add(cv,r);
}
This.fireEvent("searchover",r);
});
}});
XN.event.enableCustomEvent(XN.ui.autoComplete.prototype);
(function(){
var _937={};
getCompleteMenu=function(id){
return _937[id];
};
XN.ui.autoCompleteMenu=function(p){
var This=this;
this._MID=XN.util.createObjID();
_937[this._MID]=this;
this.config=this.config||{};
$extend(this.config,{ulClassName:"",liClassName:"",liHoverClass:"m-autosug-hover",aClassName:"",noResult:"\u6ca1\u6709\u5339\u914d\u7ed3\u679c",dataLoading:"\u6b63\u5728\u52a0\u8f7d\u6570\u636e...",noInput:null,autoSelectFirst:false});
XN.ui.autoComplete.call(this,p);
var _93b=this.input;
var m=$element("div");
m.innerHTML=this.getConfig("wrapper")||this._wrapper();
this._menuList=m.firstChild;
this._ul=this._menuList.getElementsByTagName("ul")[0];
this.menu=new XN.ui.menu({button:_93b,menu:this._menuList,fireOn:"manual"});
this.addEvent("keydown",this._inputOnkeydown);
XN.event.addEvent(this._ul,"mousedown",function(e){
This._menuOnclick(e||window.event);
});
XN.event.addEvent(_93b,"blur",function(){
This.menu.hide();
});
this.menu.hide();
this.addEvent("noinput",function(){
var tip=this.getConfig("noInput");
if(!tip){
this.menu.hide();
return;
}
this._ul.innerHTML="<li>"+tip+"</li>";
this.menu.show();
});
this.addEvent("NO_DS",function(){
this._noDataShow();
});
this.addEvent("searchover",function(_93f){
this._buildMenu(_93f);
});
};
XN.ui.autoCompleteMenu.prototype=$extend({},XN.ui.autoComplete.prototype);
$extend(XN.ui.autoCompleteMenu.prototype,{menu:null,_menuList:null,_ul:null,_currentLi:null,_highlightMenuItem:function(li){
if(li==this._currentLi){
return;
}
var _941=this.getConfig("liHoverClass");
if(this._currentLi!==null){
XN.element.delClass(this._currentLi,_941);
}
XN.element.addClass(li,_941);
this._currentLi=li;
var aid=this._currentLi.getAttribute("aid");
if(aid){
this.fireEvent("highlight",this.result[parseInt(aid)]);
}
},_inputOnkeydown:function(_943){
var li;
if(_943.keyCode==13){
if(this.menu.isShow&&this._currentLi){
var aid=this._currentLi.getAttribute("aid");
if(aid){
this._selectMenuItem(parseInt(aid));
}
}
return false;
}
if(_943.keyCode==38){
if(this._currentLi&&this._currentLi.previousSibling){
li=this._currentLi.previousSibling;
}else{
li=this._ul.lastChild;
}
this._highlightMenuItem(li);
return false;
}
if(_943.keyCode==40){
if(this._currentLi&&this._currentLi.nextSibling){
li=this._currentLi.nextSibling;
}else{
li=this._ul.firstChild;
}
this._highlightMenuItem(li);
return false;
}
return true;
},_menuOnclick:function(_946){
var el=XN.event.element(_946);
while(el&&el.tagName&&el.tagName.toLowerCase()!=="li"){
el=el.parentNode;
}
if(!el||el.nodeType!==1||!el.getAttribute("aid")){
return false;
}
this._selectMenuItem(parseInt(el.getAttribute("aid")));
return false;
},_menuOnmouseover:function(_948){
var el=XN.event.element(_948);
if(el.parentNode==$("dropmenuHolder")){
return;
}
while(el&&el.tagName&&el.tagName.toLowerCase()!=="li"){
el=el.parentNode;
}
if(!el||el.nodeType!==1||!el.getAttribute("aid")){
return false;
}
this._highlightMenuItem(el);
return false;
},_selectMenuItem:function(id){
this.menu.hide();
this.input.focus();
this.fireEvent("select",this.result[id]);
this._lastInput=this.input.value;
},_buildMenu:function(_94b){
var This=this;
this.result=_94b;
if(_94b.length>0){
this.fireEvent("hasResult");
}
if(_94b.length==0){
this.fireEvent("noResult");
var _94d=this.getConfig("noResult");
if(isFunction(_94d)){
_94d=_94d.call(this);
}
this._ul.innerHTML="<li>"+_94d+"</li>";
this.menu.show();
this._currentLi=null;
return;
}
var lis=[];
lis.push(this.firstMenuItem());
var len=_94b.length-1;
XN.array.each(_94b,function(i,v){
lis.push("<li onmouseover=\"getCompleteMenu("+This._MID+")._highlightMenuItem(this);\" aid=\""+i+"\">"+This.buildMenu(v)+"</li>");
});
lis.push(this.lastMenuItem());
this._ul.innerHTML=lis.join("");
if(this.getConfig("autoSelectFirst")){
this._highlightMenuItem(this._ul.firstChild);
}
this.menu.show();
},_noDataShow:function(){
var tip=this.getConfig("dataLoading");
this._ul.innerHTML="<li>"+tip+"</li>";
this.menu.show();
},firstMenuItem:function(){
return "";
},lastMenuItem:function(){
return "";
},buildMenu:function(r){
return "<li>"+r.name+"</li>";
},setMenuWidth:function(w){
this.menu.setWidth(w);
}});
XN.ui.autoCompleteMenu.prototype._wrapper=function(){
return ["<div class=\"m-autosug\">","<span class=\"x1\">","<span class=\"x1a\"></span>","</span>","<span class=\"x2\">","<span class=\"x2a\"></span>","</span>","<div class=\"m-autosug-minwidth\">","<div class=\"m-autosug-content\">","<ul></ul>","</div>","</div>","</div>"].join("");
};
})();
XN.ui.friendSelector=function(_955){
var This=this;
this.config=this.config||{};
$extend(this.config,{getFriendsUrl:"http://browse."+XN.env.domain+"/getfriendsajax.do?s=1",url:"http://friend."+XN.env.domain+"/friendsSelector.do",param:{}});
$extend(this.config,_955.params);
if(isUndefined(this.getConfig("page"))){
this.config["page"]=false;
}
XN.ui.autoCompleteMenu.call(this,_955);
this.addEvent("select",function(r){
this.input.value=r.name;
if(this.onSelectOne){
this.onSelectOne(r);
}
});
this.buildMenu=function(r){
return r.name;
};
this.addEvent("focus",function(){
if(this._ready){
return;
}
if(this._isLoading){
return;
}
this.loadFriends();
});
};
XN.ui.friendSelector.prototype=$extend({},XN.ui.autoCompleteMenu.prototype);
$extend(XN.ui.friendSelector.prototype,{_isLoading:false,_ready:false,isReady:function(){
return this._ready;
},isLoading:function(){
return this._isLoading;
},loadFriends:function(r){
if(this.isLoading()){
return;
}
this._isLoading=true;
var This=this;
var p={};
p["init"]=true;
p["uid"]=false;
p["uhead"]=false;
p["uname"]=false;
p["group"]=false;
p["net"]=false;
p["param"]=this.getConfig("param");
p["page"]=this.getConfig("page");
new XN.NET.xmlhttp({useCache:true,url:this.getConfig("url"),method:"get",data:"p="+XN.JSON.build(p),onSuccess:function(r){
r=XN.JSON.parse(r.responseText);
This._onload(r);
}});
},_onload:function(r){
this._isLoading=false;
this._ready=true;
this.config.qkey=r.qkey;
this.DS=new XN.util.DS_friends({url:this.getConfig("url"),qkey:this.getConfig("qkey"),limit:this.getConfig("limit"),page:this.getConfig("page"),param:this.getConfig("param")});
}});
XN.ui.friendSelectorSynchronous=function(a,b){
function s(id,ac,v){
if(isObject(id)){
id=id.id;
}
if(v.isReady()){
try{
v[ac](id);
}
catch(e){
}
}else{
v.addEvent("load",function(){
try{
v[ac](id);
}
catch(e){
}
});
v.loadFriends();
}
}
a.addEvent("select",function(id){
s(id,"select",b);
});
a.addEvent("deselect",function(id){
s(id,"deselect",b);
});
b.addEvent("select",function(id){
s(id,"select",a);
});
b.addEvent("deselect",function(id){
s(id,"deselect",a);
});
};
(function(){
XN.ui.multiFriendSelector=function(_967){
var This=this;
this._ID=XN.util.createObjID();
this.config=this.config||{};
$extend(this.config,{inputName:"ids",nameInputName:"names",url:"http://friend."+XN.env.domain+"/friendsSelector.do",initParam:{},param:{},noInput:false,maxNum:-1});
$extend(this.config,_967);
this.frame=$element("div");
var div=$element("div");
div.hide();
document.body.appendChild(div);
div.appendChild(this.frame);
this.frame.innerHTML=["<div id=\""+this.getID("friendsContainer")+"\" class=\"tokenizer friendAutoSelector\">","<span class=\"tokenizer_stretcher\">^_^</span>","<span class=\"tab_stop\"><input/></span>","<span id=\""+this.getID("inputContainer")+"\" class=\"tokenizer_input\"><input id=\""+this.getID("input")+"\" type=\"text\" /></span>","</div>","<div class=\"float-right\" id=\""+this.getID("menu")+"\"></div>"].join("");
this.input=this.getEl("input");
this.menuContainer=this.getEl("menu");
XN.event.addEvent(this.getEl("friendsContainer"),"click",function(e){
This._parseClickEvent(e||window.event);
});
this.autoComplete=new XN.ui.friendSelector({id:this.input,inputTip:"\u8f93\u5165\u597d\u53cb\u59d3\u540d...",autoSelectFirst:true,url:this.getConfig("url"),param:this.getConfig("param")});
this.autoComplete.loadFriends=function(r){
if(this.isLoading()){
return;
}
this._isLoading=true;
var p={};
p["init"]=true;
p["uid"]=true;
p["uhead"]=false;
p["uname"]=true;
p["group"]=false;
p["net"]=false;
$extend(p,This.getConfig("initParam"));
p["param"]=this.getConfig("param");
new XN.NET.xmlhttp({useCache:true,url:this.getConfig("url"),method:This.getConfig("loadMethod")||"get",data:"p="+XN.JSON.build(p),onSuccess:function(r){
r=XN.JSON.parse(r.responseText);
This._allFriends=r.candidate;
This.fireEvent("load");
This.autoComplete._onload(r);
}});
};
this.autoComplete.buildMenu=function(r){
return "<p>"+r.name+"</p>";
};
this.autoComplete.setMenuWidth(129);
this.autoComplete.addEvent("keydown",function(e){
This._onInputKeydown(e);
});
this.autoComplete.addEvent("select",function(r){
XN.log(this.input);
this.input.value="";
This.selectFriend(r);
});
if(this.getConfig("noInput")){
this.input.hide();
}
this.fireEvent("init");
};
var _971=XN.ui.multiFriendSelector.prototype=$extend({},XN.ui.element);
$extend(_971,{isReady:function(){
return this.autoComplete.isReady();
},isLoading:function(){
return this.autoComplete.isLoading();
},loadFriends:function(){
this.autoComplete.loadFriends();
},getUserByID:function(id){
id=String(id);
var rt=null;
XN.array.each(this._allFriends,function(i,v){
if(String(v.id)==id){
rt=v;
return false;
}
});
return rt;
},getConfig:function(key){
if(key=="inputName"){
return this.config["idInputName"]||this.config["inputName"];
}
return this.config[key];
},getID:function(id){
return "mfs_"+this._ID+id;
},getFriendID:function(id){
return this.getID("friend_"+id);
},getFriendEl:function(id){
return $(this.getFriendID(id));
},getEl:function(id){
return $(this.getID(id));
},getFriendsNum:function(){
return this.getEl("friendsContainer").getElementsByTagName("a").length;
},getSelectedFriends:function(){
var rt=[];
var a=XN.array.build(this.getEl("friendsContainer").getElementsByTagName("a"));
XN.array.each(a,function(i,v){
rt.push(v.getAttribute("uid")+"");
});
return rt;
},reset:function(){
this.deselectAll();
},deselectAll:function(){
var els=XN.array.build(this.getEl("friendsContainer").getElementsByTagName("a"));
XN.array.each(els,function(i,v){
XN.element.remove(v);
});
this.fireEvent("deselectAll",this.getIds());
},selectFriends:function(fs){
var This=this;
XN.array.each(fs,function(i,v){
This.select(v);
});
},deselectFriends:function(fs){
var This=this;
XN.array.each(fs,function(i,v){
This.deselect(v);
});
},select:function(o){
if(isUndefined(o)){
return;
}
XN.log("mfs select:");
XN.log(o);
var _98b=this.getConfig("maxNum");
if(_98b!==-1){
if(this.getFriendsNum()==_98b){
this.fireEvent("overMaxNum",_98b);
return;
}
}
if(isString(o)||isNumber(o)){
o={id:o,name:this.getUserByID(o).name};
}
if(this.getFriendEl(o.id)){
return;
}
this.getEl("friendsContainer").insertBefore(this.createFriendHTML(o.id,o.name),this.getEl("inputContainer"));
this.fireEvent("select",o.id);
},deselect:function(uid){
if(!this.getFriendEl(uid)){
return;
}
this.getFriendEl(uid).remove();
this.fireEvent("deselect",uid);
},_parseClickEvent:function(e){
var el=XN.event.element(e);
XN.event.stop(e);
if(el&&el.getAttribute("action")){
this.deselectFriend(el.getAttribute("uid"));
}
},createFriendHTML:function(uid,_990){
var a=$element("a");
a.id=this.getFriendID(uid);
a.setAttribute("uid",uid);
a.href="#nogo";
a.className="token";
a.tabindex="-1";
a.innerHTML=["<span>\n<span>\n<span>\n<span>\n<input type=\"hidden\" value=\"",uid,"\" name=\"",this.getConfig("inputName"),"\" />\n","<input type=\"hidden\" value=\"",_990,"\" name=\"",this.getConfig("nameInputName"),"\" />\n",_990,"<span uid=\"",uid,"\" action=\"x\" class=\"x\" onmouseout=\"this.className='x'\" onmouseover=\"this.className='x_hover'\" >\n</span>\n</span>\n</span>\n</span>\n</span>"].join("");
return a;
},_onInputKeydown:function(_992){
var i=this.getEl("inputContainer"),pa=i.previousSibling,na=i.nextSibling,_996=this.input,c=this.getEl("friendsContainer");
if(_992.keyCode==8&&this.input.value==""){
if(pa){
this.deselectFriend(pa.getAttribute("uid"));
}
return true;
}else{
if(_992.keyCode==37&&this.input.value==""){
if(pa&&pa.tagName.toLowerCase()=="a"){
i.parentNode.removeChild(i);
c.insertBefore(i,pa);
setTimeout(function(){
_996.focus();
},0);
}
return true;
}else{
if(_992.keyCode==39&&this.input.value==""){
if(na&&na.tagName.toLowerCase()=="a"){
i.parentNode.removeChild(i);
XN.dom.insertAfter(i,na);
setTimeout(function(){
_996.focus();
},0);
}
return true;
}
}
}
return false;
}});
XN.event.enableCustomEvent(_971);
_971.deSelectAll=_971.deselectAll;
_971.deSelectFriend=_971.deselectFriend=_971.deselect;
_971.selectFriend=_971.select;
_971.getSelectedFriendsID=_971.getSelectedFriends;
_971.getIds=_971.getSelectedFriends;
})();
XN.ui.friendSelectorWithMenu=function(p){
var _999=new XN.ui.friendSelector(p);
var menu=new XN.ui.friendSelectorMenu({url:_999.getConfig("url"),param:_999.getConfig("param"),multi:false,alignType:p.alignType,offsetX:p.offsetX,offsetY:p.offsetY,initParam:p.initParam});
var div=$element("div");
div.addChild(_999);
div.addChild(menu);
_999.frame=div;
_999.addEvent("focus",function(){
menu.menu.hide();
});
menu.addEvent("select",function(p){
var This=this;
setTimeout(function(){
This.menu.hide();
},30);
_999.fireEvent("select",this.getUserByID(p));
});
menu.menu.menu.setOffsetY(9);
return _999;
};
XN.ui.multiFriendSelectorWithMenu=function(p){
var _99f=new XN.ui.multiFriendSelector(p);
var menu=new XN.ui.friendSelectorMenu({url:_99f.getConfig("url"),param:_99f.getConfig("param"),multi:true,showSelectAllCheckbox:_99f.getConfig("showSelectAllCheckbox")||false});
menu.addEvent("submit",function(){
menu.menu.hide();
});
_99f.menuContainer.setContent(menu);
XN.ui.friendSelectorSynchronous(_99f,menu);
return _99f;
};
(function(ns){
var _9a2=false;
var _9a3=XN.event.addEvent;
var log=function(s){
if(_9a2){
XN.log(isString(s)?"ui.tabView:"+s:s);
}
return s;
};
ns.tabView=function(_9a6){
this.config={selectedClass:"select",event:"click",alwaysReload:false,mouseOverDelay:0.2};
$extend(this.config,_9a6);
this.init();
};
ns.tabView.prototype={_tabs:null,_currentTab:null,_idPre:null,_tabIndex:0,init:function(){
this._idPre=XN.util.createObjID();
this._tabs=[];
},getConfig:function(key){
if(key=="activeClass"){
return this.config["activeClass"]||this.config["selectedClass"];
}
return this.config[key];
},_getID:function(el){
if(el.nodeType&&el.nodeType==1){
return this._setID(el).id;
}
return el;
},_setID:function(el){
if(!el.id){
this._tabIndex++;
el.setAttribute("id","tabview_"+this._idPre+"_"+this._tabIndex);
}
return $(el);
},_getTab:function(id){
log("_getTab start");
log("param:id");
log(id);
if(!id){
return log(id);
}
if(id.label){
return log(id);
}
var key=this._getID(id);
log("key:"+key);
var tabs=this._tabs;
log("all tabs");
log(tabs);
for(var i=tabs.length-1;i>=0;i--){
if(tabs[i].key==key){
log("_getTab end");
return log(tabs[i]);
}
}
log("_getTab end");
return log(null);
},getCurrentTab:function(){
return this._getTab(this._currentTab);
},setCurrentTab:function(tab,_9af){
log("setCurrentTab start");
var oldC=this.getCurrentTab();
var nowC=this._getTab(tab);
log("old current:");
log(oldC);
log("now current:");
log(nowC);
if(oldC&&oldC.key==nowC.key&&!_9af){
return;
}
if(oldC){
this._deactiveTab(oldC);
}
this._activeTab(nowC);
this._setCurrentTab(nowC);
log("setCurrentTab end");
this.fireEvent("change",nowC);
return this;
},reset:function(){
var tab=this.getCurrentTab();
if(tab){
this._deactiveTab(tab);
}
this._setCurrentTab(null);
return this;
},_activeTab:function(tab){
log("_activeTab:");
log(tab);
tab.getEl("label").addClass(this.getConfig("activeClass"));
if(tab.content){
tab.getEl("content").show();
}
tab.onActive(tab);
log("_activeTab end");
},_deactiveTab:function(tab){
if(tab.getEl("label")){
tab.getEl("label").delClass(this.getConfig("activeClass"));
}
if(tab.content){
tab.getEl("content").hide();
}
tab.onInactive(tab);
},_setCurrentTab:function(tab){
log("_setCurrentTab start");
tab=this._getTab(tab);
log("currentTab:");
log(tab);
this._currentTab=tab?tab.key:null;
log("this._currentTab");
log(this._currentTab);
log("_setCurrentTab end");
},addTab:function(t){
log("addTab start");
log("params:");
log(t);
var This=this;
var tab={onActive:XN.func.empty,onClick:XN.func.empty,onInactive:XN.func.empty,onInit:XN.func.empty,getEl:function(key){
return $(this[key]);
},active:false};
t.label=this._setID($(t.label));
t.key=t.key||t.label.id;
if(t.content){
t.content=this._getID(t.content);
log("get content id:"+t.content);
}
$extend(tab,t);
this._tabs.push(tab);
log("all tabs");
log(this._tabs);
if(tab.active&&this._currentTab===null){
if(tab.content){
tab.getEl("content").show();
}
tab.label.addClass(this.getConfig("activeClass"));
this._setCurrentTab(tab);
}else{
if(tab.content){
tab.getEl("content").hide();
}
}
var ev=this.getConfig("event");
if(ev=="click"){
_9a3(tab.label,"click",function(e){
e=e||window.event;
XN.event.stop(e);
This._eventHander(e,tab.label);
},false);
}else{
if(ev=="mouseover"){
var _9bc=true;
var _9bd=null;
_9a3(tab.label,"mouseover",function(e){
var el=this;
_9bc=true;
_9bd=setTimeout(function(){
if(!_9bc){
return;
}
e=e||window.event;
This._eventHander(e,tab.label);
},This.getConfig("mouseOverDelay")*1000);
},false);
_9a3(tab.label,"mouseleave",function(e){
_9bc=false;
if(_9bd){
clearTimeout(_9bd);
}
},false);
}
}
tab.onInit(tab);
log("addTab end");
return this;
},_eventHander:function(e,el){
log("on click,el:");
log(el);
log("get tab form by el:");
var tab=this._getTab(el);
if(this.getConfig("alwaysReload")){
this.setCurrentTab(tab,true);
}else{
this.setCurrentTab(tab);
}
tab.onClick(e,tab);
},refresh:function(){
this._activeTab(this.getCurrentTab());
return this;
},showTab:function(id,_9c5){
this.setCurrentTab(id,_9c5);
},hideAll:function(){
this.reset();
}};
XN.event.enableCustomEvent(ns.tabView.prototype);
})(XN.ui);
XN.ui.refreshAll=function(){
document.body.style.zoom=1.1;
document.body.style.zoom=1;
};
XN.effect={fadeIn:function(_9c6,_9c7){
if(_9c6.fadetimer){
return;
}
_9c7=_9c7||XN.FUNC.empty;
var op=0;
_9c6.setOpacity(0);
_9c6.style.display="";
_9c6.fadetimer=setInterval(function(){
XN.Element.setOpacity(_9c6,(op+=0.2));
if(op>=1){
clearInterval(_9c6.fadetimer);
_9c6.fadetimer=null;
_9c7(_9c6);
}
},60);
},fadeOut:function(_9c9,_9ca){
if(_9c9.fadetimer){
return;
}
_9ca=_9ca||XN.FUNC.empty;
var op=1;
_9c9.setOpacity(1);
_9c9.fadetimer=setInterval(function(){
XN.Element.setOpacity(_9c9,(op-=0.2));
if(op<=0){
clearInterval(_9c9.fadetimer);
_9c9.fadetimer=null;
_9ca(_9c9);
_9c9.setOpacity(1);
}
},60);
},gradient:function(_9cc,r,g,b,_9d0){
if(_9cc.gradientTimer){
return;
}
_9d0=_9d0||XN.FUNC.empty;
_9cc.style.backgroundColor="#fff";
_9cc.style.backgroundColor="rgb("+r+","+g+","+b+")";
_9cc.gradientTimer=setInterval(function(){
b+=10;
_9cc.style.backgroundColor="rgb("+r+","+g+","+(b>255?255:b)+")";
if(b>255){
clearInterval(_9cc.gradientTimer);
_9cc.gradientTimer=null;
_9d0(_9cc);
}
},60);
},slideOpen:function(_9d1){
if(_9d1.slidetimer){
return;
}
if(!_9d1.slideHeight){
var _9d2=_9d1.getStyle("position");
_9d1.setStyle("position:absolute;left:-99999px;top:-99999px;");
_9d1.show();
_9d1.slideHeight=_9d1.offsetHeight;
_9d1.hide();
_9d1.setStyle("position:"+_9d2+";left:auto;top:auto;");
}
var eh=_9d1.slideHeight,h=0;
var step=parseInt(eh/10);
_9d1.style.height="0px";
_9d1.style.display="";
_9d1.style.overflow="hidden";
_9d1.slidetimer=setInterval(function(){
_9d1.style.height=(h+=step)+"px";
if(h>=eh){
clearInterval(_9d1.slidetimer);
_9d1.slidetimer=null;
_9d1.style.height=eh;
_9d1.style.overflow=_9d1.slideOverflow;
}
},50);
},slideClose:function(_9d6){
if(_9d6.slidetimer){
return;
}
var eh=_9d6.offsetHeight,h=eh;
_9d6.slideHeight=eh;
_9d6.slideOverflow=_9d6.getStyle("overflow");
_9d6.style.overflow="hidden";
var step=parseInt(eh/10);
_9d6.slidetimer=setInterval(function(){
_9d6.style.height=(h-=step)+"px";
if(h<=0){
clearInterval(_9d6.slidetimer);
_9d6.slidetimer=null;
_9d6.style.display="none";
_9d6.style.height=eh;
_9d6.style.overflow=_9d6.slideOverflow;
}
},50);
},scrollTo:function(_9da,_9db,_9dc){
if(_9da.scrolltimer){
return;
}
_9db=_9db||10;
_9dc=_9dc||XN.FUNC.empty;
var d=_9da.realTop();
var i=XN.EVENT.winHeight();
var h=document.body.scrollHeight;
var a=XN.EVENT.scrollTop();
var _9e1=null;
if(d>a){
if(d+_9da.offsetHeight<i+a){
return;
}
_9da.scrolltimer=setInterval(function(){
a+=Math.ceil((d-a)/_9db)||1;
window.scrollTo(0,a);
if(a==d){
clearInterval(_9da.scrolltimer);
_9da.scrolltimer=null;
}
},10);
}else{
_9da.scrolltimer=setInterval(function(){
a+=Math.ceil((d-a)/_9db)||-1;
window.scrollTo(0,a);
if(a==d){
clearInterval(_9da.scrolltimer);
_9da.scrolltimer=null;
}
},10);
}
}};
XN.EFFECT=XN.Effect=XN.effect;
(function(_9e2){
var _9e3={linear:function(t,b,c,d){
return c*t/d+b;
},easeIn:function(t,b,c,d){
return c*(t/=d)*t+b;
},easeOut:function(t,b,c,d){
return -c*(t/=d)*(t-2)+b;
},easeBoth:function(t,b,c,d){
if((t/=d/2)<1){
return c/2*t*t+b;
}
return -c/2*((--t)*(t-2)-1)+b;
},easeInStrong:function(t,b,c,d){
return c*(t/=d)*t*t*t+b;
},easeOutStrong:function(t,b,c,d){
return -c*((t=t/d-1)*t*t*t-1)+b;
},easeBothStrong:function(t,b,c,d){
if((t/=d/2)<1){
return c/2*t*t*t*t+b;
}
return -c/2*((t-=2)*t*t*t-2)+b;
},elasticIn:function(t,b,c,d,a,p){
if(t===0){
return b;
}
if((t/=d)==1){
return b+c;
}
if(!p){
p=d*0.3;
}
if(!a||a<Math.abs(c)){
a=c;
var s=p/4;
}else{
var s=p/(2*Math.PI)*Math.asin(c/a);
}
return -(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;
},elasticOut:function(t,b,c,d,a,p){
if(t===0){
return b;
}
if((t/=d)==1){
return b+c;
}
if(!p){
p=d*0.3;
}
if(!a||a<Math.abs(c)){
a=c;
var s=p/4;
}else{
var s=p/(2*Math.PI)*Math.asin(c/a);
}
return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;
},elasticBoth:function(t,b,c,d,a,p){
if(t===0){
return b;
}
if((t/=d/2)==2){
return b+c;
}
if(!p){
p=d*(0.3*1.5);
}
if(!a||a<Math.abs(c)){
a=c;
var s=p/4;
}else{
var s=p/(2*Math.PI)*Math.asin(c/a);
}
if(t<1){
return -0.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;
}
return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*0.5+c+b;
},backIn:function(t,b,c,d,s){
if(typeof s=="undefined"){
s=1.70158;
}
return c*(t/=d)*t*((s+1)*t-s)+b;
},backOut:function(t,b,c,d,s){
if(typeof s=="undefined"){
s=1.70158;
}
return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;
},backBoth:function(t,b,c,d,s){
if(typeof s=="undefined"){
s=1.70158;
}
if((t/=d/2)<1){
return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;
}
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;
},bounceIn:function(t,b,c,d){
return c-_9e3["bounceOut"](d-t,0,c,d)+b;
},bounceOut:function(t,b,c,d){
if((t/=d)<(1/2.75)){
return c*(7.5625*t*t)+b;
}else{
if(t<(2/2.75)){
return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b;
}else{
if(t<(2.5/2.75)){
return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b;
}
}
}
return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b;
},bounceBoth:function(t,b,c,d){
if(t<d/2){
return _9e3["bounceIn"](t*2,0,c,d)*0.5+b;
}
return _9e3["bounceOut"](t*2-d,0,c,d)*0.5+c*0.5+b;
}};
var _a30=function(){
_a31(this.onTweening,this);
if(this.current>=this.frames){
this.stop();
_a31(this.onComplete,this);
this.tweening=false;
return;
}
this.current++;
};
var _a31=function(func,_a33){
var args=Array.prototype.slice.call(arguments);
args=args.slice(2);
if(typeof func=="function"){
try{
return func.apply(_a33||this,args);
}
catch(e){
_a33.errors=_a33.errors||[];
_a33.errors.push(e);
}
}
};
_9e2.Motion=function(_a35,_a36){
this.duration=_a36||1000;
this.tween=_a35||"linear";
};
_9e2.Motion.getTweens=function(){
return _9e3;
};
_9e2.Motion.prototype={init:function(){
_a31(this.onInit,this);
this.fps=this.fps||35;
this.frames=Math.ceil((this.duration/1000)*this.fps);
if(this.frames<1){
this.frames=1;
}
var f=("function"==typeof this.tween)?this.tween:_9e3[this.tween]||_9e3["linear"];
this.equation=function(from,to){
return f((this.current/this.frames)*this.duration,from,to-from,this.duration);
};
this.current=this.tweening=1;
},start:function(){
this.init();
_a31(this.onStart,this);
var _a3a=this,d=this.duration/this.frames;
this.timer=setInterval(function(){
_a30.call(_a3a);
},d);
},stop:function(){
if(this.timer){
clearInterval(this.timer);
}
this.tweening=false;
}};
})(XN.effect);
XN.ui.getHiddenDiv=function(){
if(!this._hiddenDiv){
this._hiddenDiv=$element("div").hide();
document.body.appendChild(this._hiddenDiv);
}
return this._hiddenDiv;
};
XN.ui.friendSearchBar=function(p){
var _a3d=$(p.input);
var _a3e=$(p.submit||null);
var form=$(p.form);
var tip=p.tip||"\u627e\u4eba...";
var _a41=p.action||function(p){
if(p.type&&p.type=="PAGE"){
window.location.href="http://page."+XN.ENV.domain+"/"+p.id+"?from=opensearch";
}else{
window.location.href="http://www."+XN.ENV.domain+"/profile.do?id="+p.id+"&from=opensearch";
}
};
var _a43=false;
(new XN.FORM.inputHelper(_a3d)).setDefaultValue(tip).onEnter(function(el){
if(_a43){
return;
}
if(!XN.STRING.isBlank(el.value)){
form.submit();
}
});
var _a45=16;
var _a46={id:_a3d,noResult:function(){
return "\u641c\u7d22\""+this.input.value+"\"";
},limit:_a45,params:p.params};
var _a47=new XN.UI.friendSelector(_a46);
_a47.lastMenuItem=function(){
if(this.result.length==_a45){
return "<li><p><a onmousedown=\"window.location.href=this.href\" href=\"http://friend."+XN.env.domain+"/myfriendlistx.do?qu="+this.input.value+"\">\u70b9\u51fb\u67e5\u770b\u66f4\u591a..</a></p></li>";
}else{
return "";
}
};
_a47.setMenuWidth(_a3d.offsetWidth);
_a47.onSelectOne=function(p){
_a43=true;
_a41(p);
};
if(_a3e){
_a3e.onclick=function(){
if(_a43){
return false;
}
var v=_a3d.value;
if(v!=tip&&!XN.STRING.isBlank(v)){
form.submit();
return false;
}
if(_a3e.tagName.toLowerCase()=="a"){
return true;
}else{
return false;
}
};
}
};
XN.ui.navSearchBar=function(p){
var _a4b=$(p.input);
var _a4c=$(p.submit||null);
var form=$(p.form);
var tip=p.tip||"\u627e\u4eba...";
var _a4f=p.action||function(p){
if(p.type&&p.type=="PAGE"){
window.location.href="http://page."+XN.ENV.domain+"/"+(p.id||p.uid)+"?from=opensearch";
}else{
window.location.href="http://www."+XN.ENV.domain+"/profile.do?id="+(p.id||p.uid)+"&from=opensearch";
}
};
var _a51=false;
(new XN.FORM.inputHelper(_a4b)).setDefaultValue(tip).onEnter(function(el){
if(_a51){
return;
}
if(!XN.STRING.isBlank(el.value)){
form.submit();
}
});
var _a53=7;
var _a54={id:_a4b,noResult:function(){
return "<a onmousedown=\"window.location.href=this.href\" href=\"http://browse."+XN.env.domain+"/searchEx.do?from=opensearchclick&q="+encodeURIComponent(this.input.value)+"\" title=\"\u641c\u7d22"+this.input.value+"\">\u641c\u7d22\""+this.input.value+"\"</a>";
},limit:_a53,params:p.params,wrapper:["<div class=\"\">","<span class=\"x1\">","<span class=\"x1a\"></span>","</span>","<span class=\"x2\">","<span class=\"x2a\"></span>","</span>","<div class=\"m-autosug-minwidth\">","<div class=\"m-autosug-content\">","<ul class=\"search-Result\"></ul>","</div>","</div>","</div>"].join(""),url:"http://sg."+XN.env.domain+"/s/h"};
var _a55=new XN.UI.friendSelector(_a54);
_a55.loadFriends=function(r){
if(this.isLoading()){
return;
}
this._isLoading=true;
var This=this;
this._onload();
};
_a55._onload=function(){
this.isLoading=false;
this._ready=true;
this.DS=new XN.util.DS_friends({url:this.getConfig("url"),qkey:this.getConfig("qkey"),limit:this.getConfig("limit"),page:this.getConfig("page"),param:this.getConfig("param")});
this.DS.query=function(v,_a59){
var This=this;
try{
this._request.abort();
}
catch(e){
}
function parseDS_JSON(r){
r=r.responseText;
var pp;
try{
var rt=XN.JSON.parse(r);
if(This.rootKey&&rt[This.rootKey]){
pp=rt[This.rootKey];
}else{
pp=rt;
}
}
catch(e){
pp=[];
}
_a59(pp);
}
this._request=new XN.net.xmlhttp({url:this.url,data:"q="+encodeURIComponent(v)+"&l="+this.limit,method:this.method,onSuccess:parseDS_JSON});
};
};
_a55.buildMenu=function(r){
return "<img src=\""+(r.head||r.uhead)+"\" width=\"50\" height=\"50\" alt=\""+(r.name||r.uname)+"\"/>"+"<strong>"+(r.name||r.uname)+"</strong>";
};
_a55._noDataShow=function(){
var tip=this.getConfig("dataLoading");
this._ul.innerHTML="<li class=\"lookMore\">"+tip+"</li>";
this.menu.show();
};
_a55._buildMenu=function(_a60){
var This=this;
this.result=_a60;
if(_a60.length==0){
var _a62=this.getConfig("noResult");
if(isFunction(_a62)){
_a62=_a62.call(this);
}
this._ul.innerHTML="<li class=\"lookMore\">"+_a62+"</li>";
this.menu.show();
this._currentLi=null;
return;
}
var lis=[];
lis.push(this.firstMenuItem());
var len=_a60.length-1;
XN.array.each(_a60,function(i,v){
lis.push("<li onmouseover=\"getCompleteMenu("+This._MID+")._highlightMenuItem(this);\" aid=\""+i+"\">"+This.buildMenu(v)+"</li>");
});
lis.push(this.lastMenuItem());
this._ul.innerHTML=lis.join("");
if(this.getConfig("autoSelectFirst")){
this._highlightMenuItem(this._ul.firstChild);
}
this.menu.show();
};
_a55.lastMenuItem=function(){
if(this.result.length==_a53){
return "<li class=\"lookMore\"><a onmousedown=\"window.location.href=this.href\" href=\"http://friend."+XN.env.domain+"/myfriendlistx.do?qu="+this.input.value+"\">\u70b9\u51fb\u67e5\u770b\u66f4\u591a..</a></li>";
}else{
return "";
}
};
_a55.setMenuWidth(_a4b.offsetWidth);
_a55.onSelectOne=function(p){
_a51=true;
_a4f(p);
};
if(_a4c){
_a4c.onclick=function(){
if(_a51){
return false;
}
var v=_a4b.value;
if(v!=tip&&!XN.STRING.isBlank(v)){
form.submit();
return false;
}
if(_a4c.tagName.toLowerCase()=="a"){
return true;
}else{
return false;
}
};
}
};
XN.namespace("form");
XN.FORM=XN.Form=XN.form;
XN.form.fillWithJSON=function(form,json){
form=$(form);
XN.form.fillWithArray(form,XN.json.parse(json));
};
XN.form.fillWithArray=function(form,a){
form=$(form);
for(var p in a){
XN.form.Element.setValue(p,a[p],form);
}
};
XN.form.setValue=function(_a6e,_a6f){
return XN.form.Element.setValue(_a6e,_a6f);
};
XN.form.getValue=function(_a70){
return XN.form.Element.getValue(_a70);
};
XN.form.serialize=function(form,type){
return this.serializeElements(this.getElements(form),type||"string");
};
XN.form.serializeElements=function(_a73,type,_a75){
type=type||"array";
if(isUndefined(_a75)){
_a75=false;
}
var data=[],_key,_a78;
XN.array.each(_a73,function(i,v){
if(!v.disabled&&v.name){
_key=v.name;
_a78=_a75?encodeURIComponent(XN.form.Element.getValue(v)):XN.form.Element.getValue(v);
if(_a78!==null){
if(_key in data){
if(!isArray(data[_key])){
data[_key]=[data[_key]];
}
data[_key].push(_a78);
}else{
data[_key]=_a78;
}
}
}
});
if(type=="array"){
return data;
}else{
if(type=="string"){
return XN.array.toQueryString(data);
}else{
if(type=="hash"){
var tmp={};
for(var p in data){
if(!isFunction(data[p])){
tmp[p]=data[p];
}
}
return tmp;
}
}
}
};
XN.form.getElements=function(form){
form=$(form);
var _a7e=[];
var all=form.getElementsByTagName("*");
XN.array.each(all,function(i,v){
if(!isUndefined(XN.form.Element.Serializers[v.tagName.toLowerCase()])){
_a7e.push(v);
}
});
return _a7e;
};
XN.form.Element={getValue:function(_a82){
_a82=$(_a82);
var _a83=_a82.tagName.toLowerCase();
return XN.form.Element.Serializers[_a83](_a82);
},setValue:function(_a84,_a85,form){
if(form){
_a84=form[_a84];
if((isElement(_a84)&&_a84.tagName.toLowerCase()=="select")){
XN.form.Element.Serializers["select"](_a84,_a85);
}else{
if(isElement(_a84)){
XN.form.Element.Serializers[_a84.tagName.toLowerCase()](_a84,_a85);
}else{
if(_a84[0]){
var _a87=_a84[0].tagName.toLowerCase();
for(var i=0,j=_a84.length;i<j;i++){
XN.form.Element.Serializers[_a87](_a84[i],(_a85[i]||_a85||""));
}
}
}
}
return _a84;
}else{
_a84=$(_a84);
var _a87=_a84.tagName.toLowerCase();
XN.form.Element.Serializers[_a87](_a84,_a85);
return _a84;
}
}};
XN.form.Element.Serializers={input:function(_a8a,_a8b){
switch(_a8a.type.toLowerCase()){
case "checkbox":
case "radio":
return XN.form.Element.Serializers.inputSelector(_a8a,_a8b);
default:
return XN.form.Element.Serializers.textarea(_a8a,_a8b);
}
},inputSelector:function(_a8c,_a8d){
if(isUndefined(_a8d)){
return _a8c.checked?_a8c.value:null;
}else{
_a8c.checked=!!_a8d;
}
},textarea:function(_a8e,_a8f){
if(isUndefined(_a8f)){
return _a8e.value;
}else{
_a8e.value=_a8f;
}
},select:function(_a90,_a91){
if(isUndefined(_a91)){
return this[_a90.type=="select-one"?"selectOne":"selectMany"](_a90);
}else{
var opt,_a93,_a94=!isArray(_a91);
for(var i=0,_a96=_a90.length;i<_a96;i++){
opt=_a90.options[i];
_a93=this.optionValue(opt);
if(_a94){
if(_a93==_a91){
opt.selected=true;
return;
}
}else{
opt.selected=XN.array.include(_a91,_a93);
}
}
}
},selectOne:function(_a97){
var _a98=_a97.selectedIndex;
return _a98>=0?this.optionValue(_a97.options[_a98]):null;
},selectMany:function(_a99){
var _a9a=[],_a9b=_a99.length;
if(!_a9b){
return null;
}
for(var i=0;i<_a9b;i++){
var opt=_a99.options[i];
if(opt.selected){
_a9a.push(this.optionValue(opt));
}
}
return _a9a;
},optionValue:function(opt){
return opt.value||opt.text;
}};
$F=function(id,type){
var el=$(id);
if(el.tagName.toLowerCase()=="form"){
return XN.form.serialize(el,type);
}else{
return XN.form.getValue(el);
}
};
XN.form._helper=function(el){
el=$(el);
if(el._helper){
return el._helper;
}
el._helper=this;
this.element=el;
};
XN.form._helper.prototype={maxSize:9999,limit:function(max,cut){
var This=this;
this.maxLength=max;
if(isUndefined(cut)){
cut=true;
}
this._limit_cut=cut;
if(this._limit){
return this;
}
this._limit=true;
var This=this;
var el=this.element;
XN.event.addEvent(el,"focus",check);
XN.event.addEvent(el,"keyup",check);
function check(){
This.limitCheck();
}
return this;
},limitCheck:function(){
var This=this;
var el=this.element;
setTimeout(function(){
var v=el.value;
if(v.length>This.maxLength){
if(This._limit_cut){
el.value=v.substr(0,This.maxLength);
}
This.fireEvent("overmaxLength");
}else{
This.fireEvent("normalLength");
}
This.fireEvent("checkover");
},0);
},count:function(show,_aab){
if(this._count){
return this;
}
this._count=true;
var This=this,show=$(show);
if(isUndefined(_aab)){
_aab=true;
}
if(!this.maxLength){
_aab=false;
}
var el=this.element;
this.addEvent("overmaxLength",function(){
show.addClass("full");
});
this.addEvent("normalLength",function(){
show.delClass("full");
});
this.addEvent("checkover",update);
function update(){
show.innerHTML=el.value.length+(_aab?"/"+This.maxLength:"");
}
return this;
},countSize:function(show,max,_ab0){
return this.limit(max).count(show,_ab0);
},getRealValue:function(){
var el=this.element;
if(el.value==this._defaultValue||el.value==el.getAttribute("placeholder")){
return "";
}
return el.value;
},reloadDefaultValue:function(){
this.element.value=this._defaultValue;
this.element.style.color="#888";
},defaultValue:function(v){
var This=this;
var el=this.element;
v=v||el.value;
if(!isUndefined(this._defaultValue)&&el.value==this._defaultValue){
el.value=v;
}
this._defaultValue=v;
if(this._default){
return this;
}
this._default=true;
if(document.activeElement!==el){
el.value=v;
}
el.style.color="#888";
XN.event.addEvent(el,"focus",function(){
if(el.value==This._defaultValue){
el.value="";
el.style.color="#333";
}
});
XN.event.addEvent(el,"blur",function(){
if(el.value==""){
el.value=This._defaultValue;
el.style.color="#888";
}
});
return this;
},focus:function(_ab5){
var el=this.element;
if(isUndefined(_ab5)){
_ab5=el.value.length;
}
if(el.setSelectionRange){
el.focus();
el.setSelectionRange(el.value.length,_ab5);
}else{
if(el.createTextRange){
var _ab7=el.createTextRange();
_ab7.moveStart("character",_ab5);
_ab7.collapse(true);
_ab7.select();
el.focus();
}else{
el.focus();
}
}
return this;
},onEnter:function(_ab8){
var el=this.element;
var _aba=el.tagName.toLowerCase()=="textarea";
XN.event.addEvent(el,"keydown",function(e){
e=e||window.event;
if(e.keyCode==13){
if(_aba&&!e.ctrlKey){
return false;
}
XN.event.stop(e);
_ab8(el);
return false;
}
},false);
return this;
},onEsc:function(_abc){
var el=this.element;
XN.event.addEvent(el,"keydown",function(e){
e=e||window.event;
if(e.keyCode==27){
XN.event.stop(e);
_abc(el);
return false;
}
},false);
return this;
},autoResize:function(min,max){
var This=this,el=this.element,type;
this.minSize=min||this.minSize;
this.maxSize=max||this.maxSize;
if(el.tagName.toLowerCase()=="textarea"){
this.resizeType="height";
}else{
this.resizeType="width";
}
if(!XN.form.inputShadow){
var d=$element("div");
d.setStyle("position:absolute;left:-99999px;top:-99999px");
document.body.appendChild(d);
XN.form.inputShadow=d;
}
this.shadow=XN.form.inputShadow;
setTimeout(function(){
if(min){
return;
}
This.minSize=type=="width"?el.offsetWidth:el.offsetHeight;
},10);
el.style.overflow="hidden";
XN.event.addEvent(el,"focus",function(){
This.timer=setInterval(This._resize.bind(This),200);
});
XN.event.addEvent(el,"blur",function(){
clearInterval(This.timer);
This.timer=null;
});
return this;
},_resize:function(){
var el=this.element,sh=this.shadow,oh,type=this.resizeType;
sh.style.fontSize=el.getStyle("fontSize");
var fs=parseInt(el.getStyle("fontSize"),0);
sh.style.fontFamily=el.getStyle("fontFamily");
(type=="width")?sh.style.height=el.offsetHeight:sh.style.width=el.offsetWidth;
sh.innerHTML=XN.string.escapeHTML(el.value).replace(/\r\n/mg,"<br>").replace(/\r/mg,"<br>").replace(/\n/mg,"<br>");
(type=="width")?oh=sh.offsetWidth:oh=sh.offsetHeight+fs+3;
if(oh>this.minSize&&oh<this.maxSize){
el.style[type]=oh+"px";
}else{
if(oh<this.minSize){
el.style[type]=this.minSize+"px";
}else{
if(oh>this.maxSize){
el.style[type]=this.maxSize+"px";
}
}
}
},cursorPosition:function(){
var _aca=this.element;
var _acb=0,end=0;
if(typeof (_aca.selectionStart)=="number"){
_acb=_aca.selectionStart;
end=_aca.selectionEnd;
}else{
if(document.selection){
var _acd=document.selection.createRange();
if(_acd.parentElement()==_aca){
var _ace=document.body.createTextRange();
_ace.moveToElementText(_aca);
for(_acb=0;_ace.compareEndPoints("StartToStart",_acd)<0;_acb++){
_ace.moveStart("character",1);
}
for(var i=0;i<=_acb;i++){
if(_aca.value.charAt(i)=="\n"){
_acb++;
}
}
var _ace=document.body.createTextRange();
_ace.moveToElementText(_aca);
for(end=0;_ace.compareEndPoints("StartToEnd",_acd)<0;end++){
_ace.moveStart("character",1);
}
for(var i=0;i<=end;i++){
if(_aca.value.charAt(i)=="\n"){
end++;
}
}
}
}
}
return {"start":_acb,"end":end,"item":[_acb,end]};
}};
XN.form._helper.prototype.setDefaultValue=XN.form._helper.prototype.defaultValue;
XN.event.enableCustomEvent(XN.form._helper.prototype);
XN.form.help=function(id){
return new XN.form._helper(id);
};
XN.form.inputHelper=XN.form.textAreaHelper=XN.form.help;
$CursorPosition=function(el){
return XN.form.help(el).cursorPosition();
};
XN.form.userInfoAutoComplete=function(id,type){
var _ad4={"elementaryschool":"http://www."+XN.env.domain+"/autocomplete_elementaryschool.jsp","juniorhighschool":"http://www."+XN.env.domain+"/autocomplete_juniorhighschool.jsp","workplace":"http://www."+XN.env.domain+"/autocomplete_workplace.jsp","highschool":"http://www."+XN.env.domain+"/autocomplete_highschool.jsp","allnetwork":"http://www."+XN.env.domain+"/autocomplete_all_network.jsp","allSchool":"http://www."+XN.env.domain+"/autocomplete-school.jsp","city":"http://www."+XN.env.domain+"/autocomplete-city.jsp","college":"http://www."+XN.env.domain+"/autocomplete_college.jsp"};
var ds=new XN.ui.DS_XHR({url:_ad4[type]});
var at=new XN.ui.autoCompleteMenu({DS:ds,input:id});
at.buildMenu=function(r){
return "<p>"+(r.name||r.Name)+"</p>";
};
at.addEvent("select",function(r){
this.input.value=(r.name||r.Name);
});
return at;
};
XN.namespace("widgets");
XN.WIDGETS=XN.Widgets=XN.widgets;
XN.dom.ready(function(){
window.AppsDropMenu.dropInit();
});
XN.dom.ready(function(){
if(!$("profileDropMenu")){
return;
}
var menu=new XN.ui.menu({bar:"profileDropMenu",menu:"profileMenu",offsetX:$("showProfileMenu").realLeft()-$("profileDropMenu").realLeft(),offsetY:($("showProfileMenu").realTop()+$(Sizzle("#navBar .nav-body")[0]).offsetHeight)-($("profileDropMenu").realTop()+35),fireOn:"mouseover"});
menu.onShow=function(){
$("showProfileMenu").addClass("hover");
$("profileDropMenu").addClass("drop-menu-btn-hover");
};
menu.onHide=function(){
$("showProfileMenu").delClass("hover");
$("profileDropMenu").delClass("drop-menu-btn-hover");
};
});
XN.dom.ready(function(){
if(!$("friendDropMenu")){
return;
}
var menu=new XN.ui.menu({bar:"friendDropMenu",menu:"friendMenu",offsetX:$("showFriendMenu").realLeft()-$("friendDropMenu").realLeft(),offsetY:($("showFriendMenu").realTop()+$(Sizzle("#navBar .nav-body")[0]).offsetHeight)-($("friendDropMenu").realTop()+35),fireOn:"mouseover"});
menu.onShow=function(){
$("showFriendMenu").addClass("hover");
$("friendDropMenu").addClass("drop-menu-btn-hover");
};
menu.onHide=function(){
$("showFriendMenu").delClass("hover");
$("friendDropMenu").delClass("drop-menu-btn-hover");
};
});
XN.dom.ready(function(){
if(!$("showNewNav")){
return;
}
var btns=Sizzle(".drop-menu-btn",$("navBar"));
if(btns.length==0){
return;
}
for(var i=0;i<btns.length;i++){
$(btns[i]).addEvent("click",function(e){
e.preventDefault();
});
}
});
XN.dom.ready(function(){
if(!$("optionMenuActive")){
return;
}
new XN.UI.menu({bar:"optionMenuActive",menu:"optiondropdownMenu",fireOn:"mouseover"});
});
XN.dom.ready(function(){
if(!$("accountMenu")){
return;
}
var _ade=null;
var _adf=20;
$("accountMenu").addEvent("mouseover",function(){
if($("otherAccount").innerHTML!=""){
return;
}
new XN.NET.xmlhttp({url:"http://www.renren.com/getOtherAccounts",method:"get",onSuccess:function(_ae0){
var r=XN.JSON.parse(_ae0.responseText),_ae2=r.otherAccounts,_ae3=(_ae2!=null&&_ae2.length!=0),_ae4=(_ae2!=null?_ae2.length:0),_ae5=getSiteName(r);
var _ae6=_ae4==1;
$("otherAccount").innerHTML=["<div class=\"account-detail clearfix\">","<a href=\"javascript:;\" class=\"figure\" style=\"cursor:default\">","<img src=\"",r.self_head,"\" />","</a>","<div class=\"detail\">","<p class=\"name\" title=\"",r.self_name,"\">",r.self_name,"</p>","<p class=\"grade\">",r.self_level,"\u7ea7</p>","<p class=\"friends\">",_ae5,"</p>","</div>","</div>","<div class=\"action\"",_ae3?"":" style=\"display:none;\"",">","<a href=\"javascript:;\" class=\"switch\" ",(_ae6?" style=\"padding: 0px 12px\"":""),">",(_ae6?"\u5207\u6362\u81f3"+getSiteName(_ae2[0]):"\u5207\u6362\u8eab\u4efd"),"</a>","</div>"].join("");
$("otherAccount").style.display="block";
$(Sizzle("#accountDropDownMenu a.switch")[0]).addEvent("click",function(){
if(_ae4>1){
_ade=XN.DO.alert({title:"\u5207\u6362\u8eab\u4efd",msg:["<div id=\"switchAccountPopup\" class=\"switch-account-popup clearfix\">","<div id=\"multiSwitchTip\" class=\"switch-tip\">","\u4f60\u53ef\u4ee5\u901a\u8fc7\u201c\u5207\u6362\u8eab\u4efd\u201d\uff0c\u4ee5\u516c\u5171\u4e3b\u9875\u7684\u8eab\u4efd\u52a0\u597d\u53cb\u3001\u56de\u8e29\u7c89\u4e1d\u3001\u4e0e\u5176\u4ed6\u4e3b\u9875\u4e92\u52a8\u3002","</div>","<div class=\"accounts-list-wrapper\">","<div id=\"anotherAccount\">",generateAccountsListHtml(0,_ae4>_adf?_adf:_ae4),"</div>","</div>","<div id=\"pagerWrapper\" class=\"accounts-pager\"><ol id=\"accountsPager\" class=\"pagerpro\"></ol></div>","</div>"].join(""),noPadding:true,button:"\u53d6\u6d88",Y:60,showCloseButton:true});
_ade.container.className="other-accounts-alert";
window.scrollTo(0,0);
if(_ae4>_adf){
XN.loadFile("http://s.xnimg.cn/jspro/xn.ui.pager.js",function(){
var _ae7=new XN.ui.pager({showCount:5,container:$("accountsPager")});
_ae7.setPageCount(parseInt((_ae4-1)/_adf+1));
_ae7.setCurrentPage(1);
_ae7.addEvent("pageChange",function(num){
$("anotherAccount").innerHTML=generateAccountsListHtml((num-1)*_adf,num*_adf);
window.scrollTo(0,0);
$("anotherAccount").scrollTop=0;
});
});
}else{
if(_ae4<=4){
$("anotherAccount").style.height="auto";
$("anotherAccount").style.overflow="hidden";
}else{
$("pagerWrapper").hide();
}
}
}else{
if(_ae4==1){
handleSwitchButtonClick(_ae2[0].head,_ae2[0].name,_ae2[0].id,getSiteName(_ae2[0]),true);
}
}
});
function generateAccountsListHtml(_ae9,end){
var _aeb=[];
for(var i=_ae9;i<end;i++){
var _aed=_ae2[i];
if(_aed==undefined){
break;
}
_aeb=_aeb.concat(["<div class=\"account-detail clearfix accounts-list\" style=\"",(i==_ae9?"":"border-top:1px solid #CCCCCC;"),"\">","<a href=\"","http://www.renren.com/profile.do?id=",_aed.transId,"\" class=\"figure\">","<img src=\"",_aed.head,"\" />","</a>","<div class=\"detail\" style=\"float:left;width:auto;height:50px;line-height:50px;\">","<p class=\"name\" title=\"",_aed.name,"\">",cutShort(_aed.name),"</p>","<p class=\"grade\"></p>","</div>","<div class=\"operate\">","<input class=\"input-submit\" type=\"button\" value=\"\u5207\u6362\" ","onclick=\"handleSwitchButtonClick('",_aed.head,"','",cutShort(_aed.name),"','",_aed.id,"','",getSiteName(_aed),"')\"/>","</div>","</div>"]);
}
return _aeb.join("");
}
}});
});
function cutShort(name){
if(!name){
return name;
}
return name.length>10?name.substring(0,10)+"...":name;
}
function getSiteName(_aef){
var _af0="\u5e10\u53f7";
if(_aef.self_isPage=="true"||_aef.isPage=="true"){
_af0="\u516c\u5171\u4e3b\u9875";
}else{
if(_aef.self_domain){
if(_aef.self_domain=="kaixin.com"){
_af0="\u5f00\u5fc3\u5e10\u53f7";
}else{
if(_aef.self_domain=="renren.com"){
_af0="\u4eba\u4eba\u5e10\u53f7";
}
}
}else{
if(_aef.domain){
if(_aef.domain=="kaixin.com"){
_af0="\u5f00\u5fc3\u5e10\u53f7";
}else{
if(_aef.domain=="renren.com"){
_af0="\u4eba\u4eba\u5e10\u53f7";
}
}
}
}
}
return _af0;
}
window.handleSwitchButtonClick=function(head,name,_af3,_af4,_af5){
new XN.NET.xmlhttp({url:"http://www.renren.com/switchAccount",data:"origUrl="+encodeURIComponent(window.location.href)+"&destId="+_af3,onSuccess:function(_af6){
if(_ade){
_ade.hide();
}
var r=XN.JSON.parse(_af6.responseText);
if(r.isJump){
window.location=r.url;
}else{
showUserInfoInputArea(head,name,_af3,_af4,r,_af5);
}
}});
};
function showUserInfoInputArea(head,name,_afa,_afb,res,_afd){
var _afe=XN.DO.confirm({title:"\u5207\u6362\u8eab\u4efd",msg:["<div id=\"switchAccountPopup\" class=\"switch-account-popup clearfix\">","<div id=\"switchAccountError\" class=\"error-msg\" style=\"display:none\"></div>","<div class=\"account-info\">","<div class=\"account-detail clearfix\">","<a href=\"javascript:;\" class=\"figure\" style=\"cursor:default\">","<img src=\"",head,"\" />","</a>","<div class=\"detail\">","<p class=\"name\" style=\"width:60px;margin-top:16px;\" title=\"",name,"\">",name,"</p>","<p class=\"grade\"></p>","</div>","</div>","</div>","<div class=\"account-login\">","<p style=\"color:#5B5B5B;padding-left:17px;\">\u8bf7\u8f93\u5165",getSiteName(res),"\"",res.name,"\"\u5bf9\u5e94\u7684\u5bc6\u7801</p>","<div class=\"account\">","<span class=\"label\">\u5e10\u53f7:</span><span>",res.account,"</span>","</div>","<div class=\"password\">","<span class=\"label\">\u5bc6\u7801:</span><input type=\"password\" id=\"switchAccountPassword\" class=\"input-text\" />","</div>","<div id=\"verifycode\" class=\"verifycode\"",res.showIC?"":" style=\"display:none\"","><span class=\"label\">\u9a8c\u8bc1\u7801:</span><input id=\"switchVerifyCode\" type=\"text\" class=\"input-text\" name=\"ick\" /></div>","<div id=\"verifycode-image\" class=\"verifycode-image\"",res.showIC?"":" style=\"display:none\"","><img id=\"loginVerifyPic\" src=\"http://icode.renren.com/getcode.do?rk=300&t=LOGIN&rnd=",Math.random(),"\" /> <a href=\"javascript:;\" onclick=\"changeIC();return false;\">\u6362\u4e00\u4e2a</a></div>","</div>","</div>"].join(""),no:_afd?"\u53d6\u6d88":"\u8fd4\u56de",showCloseButton:true,callback:function(r){
if(!r){
if(_ade){
_ade.show();
}
return;
}
this.preventHide();
new XN.NET.xmlhttp({url:"http://www.renren.com/verifypwd/checkPwd",data:"ick="+$("switchVerifyCode").value+"&pwd="+$("switchAccountPassword").value+"&origUrl="+encodeURIComponent(window.location.href)+"&destId="+_afa+"&showIC="+($("verifycode-image").style.display!="none"),onSuccess:function(_b00){
var r=XN.JSON.parse(_b00.responseText);
if(r.status=="fail"){
$("switchAccountError").innerHTML=r.msg;
$("switchAccountError").style.display="block";
Sizzle(".account-login .verifycode")[0].style.display="block";
Sizzle(".account-login .verifycode-image")[0].style.display="block";
changeIC();
}else{
if(r.status=="ok"){
window.location=r.msg;
}
}
}});
}});
_afe.container.className="account-login-alert";
}
window.changeIC=function(){
$("loginVerifyPic").src="http://icode.renren.com/getcode.do?rk=300&t=LOGIN&rnd="+Math.random();
};
new XN.ui.menu({bar:"accountMenu",menu:"accountDropDownMenu",fireOn:"mouseover",alignType:"3-2"}).onShow=function(){
if($("accountMenuTip")){
$("accountMenuTip").hide();
new XN.NET.xmlhttp({url:"http://www."+XN.env.domain+"/closeShowNewHeaderTip"});
}
};
});
XN.dom.ready(function(){
if(!$("moreWeb")){
return;
}
new XN.UI.menu({bar:"moreWeb",menu:"moredownWeb",fireOn:"click",alignType:"3-2",offsetX:1});
});
function fixImage(_b02,_b03,_b04){
if(_b02.width>_b03){
_b02.width=_b03;
}
if(_b02.height>_b04){
_b02.height=_b04;
}
}
function clipImage(_b05){
if(!_b05.getAttribute("width")||!_b05.getAttribute("height")){
return;
}
var _b06=parseInt(_b05.getAttribute("width"));
var _b07=parseInt(_b05.getAttribute("height"));
if(_b05.naturalWidth&&_b05.naturalHeight&&_b05.naturalWidth==_b06&&_b05.naturalHeight==_b07){
return;
}
var _b08=new Image();
_b08.onload=function(){
if(_b08.width==_b06&&_b08.height==_b07){
return;
}
var _b09=document.createElement("i");
var _b0a=_b05.parentNode;
if(!_b0a){
return;
}
_b0a.replaceChild(_b09,_b05);
_b09.style.width=_b06+"px";
_b09.style.height=_b07+"px";
if(!XN.browser.IE){
_b09.style.display="inline-block";
_b09.appendChild(_b08);
_b09.style.overflow="hidden";
if(_b08.width>_b06){
_b08.style.marginLeft="-"+parseInt((_b08.width-_b06)/2)+"px";
}
if(_b08.height>_b07){
_b08.style.marginTop="-"+parseInt((_b08.height-_b07)/2)+"px";
}
}else{
_b09.style.zoom="1";
var top=parseInt((_b08.height-_b07)/2);
_b09.style.background="url("+_b05.src+") no-repeat -"+parseInt((_b08.width-_b06)/2)+"px -"+(top>0?top:0)+"px";
if(_b09.parentNode.tagName=="A"){
_b09.style.cursor="pointer";
}
}
};
_b08.src=_b05.src;
}
function roundify(_b0c,_b0d){
if(!_b0d){
_b0d=50;
}
if(_b0c.height<=_b0d){
return;
}
var _b0e=_b0c.parentNode;
if(!_b0e){
return;
}
_b0c.style.visibility="hidden";
var _b0f=document.createElement("i");
_b0f.title=_b0c.title;
_b0f.className=_b0c.className;
if(!XN.browser.IE){
_b0f.style.display="inline-block";
}
_b0f.style.overflow="hidden";
_b0f.style.width=_b0d+"px";
_b0f.style.height=(_b0c.height>_b0d?_b0d:_b0c.height)+"px";
var _b10=new Image();
_b0f.appendChild(_b10);
_b10.onload=function(){
_b10.width=_b0d;
_b0e.replaceChild(_b0f,_b0c);
if(_b10.height>_b0d){
_b10.style.marginTop="-"+parseInt((_b10.height-_b0d)/2)+"px";
}
};
_b10.src=_b0c.src;
return;
}
XN.dom.ready(function(){
if(!$("navSearchInput")){
return;
}
var fix=null;
function showTip(){
if(XN.form.help("navSearchInput").getRealValue()!==""){
return;
}
if(!fix){
fix=new XN.ui.fixPositionElement({alignWith:"navSearchInput",tagName:"div"});
fix.hide();
fix.setContent("&nbsp;\u591a\u4e2a\u5173\u952e\u5b57\u7528\u7a7a\u683c\u9694\u5f00&nbsp;<br />&nbsp;\uff08\u4f8b\uff1a\u6c6a\u6d0b \u5317\u4eac\u5927\u5b66\uff09&nbsp;");
fix.container.style.cssText="width:"+($("navSearchInput").offsetWidth-2)+"px;padding:3px 0;background:#EEE;border:1px solid #BDC7D8;opacity:0.8;text-align:center;";
}
fix.show();
}
XN.event.addEvent("navSearchInput","focus",showTip);
XN.event.addEvent("navSearchInput","blur",function(){
if(fix){
setTimeout(function(){
fix.hide();
},100);
}
});
XN.event.addEvent("navSearchInput","keydown",function(){
if(fix){
fix.hide();
}
});
});
(function(){
var _b12=/kaixin\.com|renren\.com|xiaonei\.com/g;
XN.widgets.rp_domain=function rp(el){
if(el.tagName&&el.tagName.toLowerCase()=="a"){
if(el._d_rpd){
return true;
}
el._d_rpd=true;
if(/http|@/.test(el.innerHTML)&&XN.browser.IE){
var _b14=el.innerHTML;
}
el.href=el.href.replace(_b12,XN.env.domain);
if(!isUndefined(_b14)){
el.innerHTML=_b14;
}
return true;
}
return false;
};
var divs=["feedHome","feedHolder","newsfeed-module-box","notifications","messages"];
XN.widgets.domain_in_one={reg:function(el){
XN.event.addEvent(el,"mouseover",function(e){
var rp=XN.widgets.rp_domain;
var el=XN.event.element(e||window.event);
if(rp(el)){
return;
}
if(rp(el.parentNode)){
return;
}
rp(el.parentNode);
});
}};
XN.dom.ready(function(){
XN.array.each(divs,function(i,v){
if($(v)){
XN.widgets.domain_in_one.reg(v);
}
});
});
})();
$.wpi=$.wpi||{};
$.wpi.appNotify={element:null,init:function(){
if(this.element==null){
this.element=document.createElement("div");
this.element.className="notify-app";
this.element.innerHTML=["<div class=\"topbg\"></div>","<div class=\"innerCon\">","<h3></h3>","<a class=\"close\"><img src=\"http://a.xnimg.cn/imgpro/chat/notify-close.gif\" /></a>","<div class=\"desc\"></div>","<div class=\"action\">","<a href=\"javascript:;\" class=\"cancel\">\u53d6\u6d88\u53d1\u9001</a>","</div>","</div>","<div class=\"bottombg\"></div>","<iframe frameBorder=\"0\"></iframe>"].join("");
document.body.appendChild(this.element);
this.hackIe6();
var that=this;
var _b1d=this.element.getElementsByTagName("a");
_b1d[0].onclick=function(){
that.hide();
};
_b1d[_b1d.length-1].onclick=function(){
new XN.net.xmlhttp({url:"http://app."+XN.env.domain+"/app/notify/cancel",method:"post",data:"notifyId="+that.data.notifyId});
new XN.net.xmlhttp({url:"http://app."+XN.env.domain+"/app/notify/statistic/",method:"get",data:"op=2&app_id="+that.data.appId});
that.hide();
};
}
var _b1e=this.element.getElementsByTagName("h3")[0];
var _b1f="";
for(var i=0;i<this.data.receivers.length;i++){
var _b21=this.data.receivers[i];
_b1f+="<a href=\"http://www."+XN.env.domain+"/profile.do?id="+_b21.id+"\" target=\"_blank\">"+_b21.name+"</a>";
if(i!=this.data.receivers.length-1){
_b1f+="\u3001";
}
}
_b1e.innerHTML="\u4f60\u5c06\u7ed9"+_b1f+(this.data.receivers.length>1?"\u7b49\u597d\u53cb":"")+"\u53d1\u9001\u4e00\u6761\u901a\u77e5";
var _b22=XN.DOM.getElementsByClassName("desc",this.element)[0];
_b22.innerHTML=this.data.content;
},hackIe6:function(){
if(XN.browser.IE6){
var that=this;
window.attachEvent("onscroll",function(){
that.element.className=that.element.className;
});
}
},show:function(data){
if(typeof data=="string"){
this.data=XN.json.parse(data);
}
this.init();
$(this.element).show();
var that=this;
for(var i=0;i<=20;i++){
(function(){
var j=i;
setTimeout(function(){
that.element.style.bottom=(that.easing(35*j,-107,137,700))+"px";
},35*j);
})();
}
var that=this;
setTimeout(function(){
that.hide();
},5500);
new XN.net.xmlhttp({url:"http://app."+XN.env.domain+"/app/notify/statistic/",method:"get",data:"op=1&app_id="+this.data.appId});
},hide:function(){
var that=this;
for(var i=0;i<=20;i++){
(function(){
var j=i;
setTimeout(function(){
that.element.style.bottom=(that.easing(35*j,30,-137,700))+"px";
j==20?$(that.element).hide():"";
},35*j);
})();
}
},easing:function(t,b,c,d){
return c*t/d+b;
}};
XN.dom.ready(function(){
if(!$("navSearchInput")){
return;
}
new XN.ui.navSearchBar({input:"navSearchInput",submit:$("navSearchSubmit"),form:$("globalSearchForm"),params:{page:true},tip:"\u627e\u4eba\u3001\u516c\u5171\u4e3b\u9875\u3001\u6e38\u620f"});
return;
if(!$("searchMenuAction")){
return;
}
new XN.ui.menu({bar:"searchMenuAction",menu:"searchdropdownMenu",fireOn:"mouseover",offsetX:1});
});
(function(){
var _b2f={getPageScroll:function(){
try{
var x,y;
if(window.pageYOffset){
y=window.pageYOffset;
x=window.pageXOffset;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
y=document.documentElement.scrollTop;
x=document.documentElement.scrollLeft;
}else{
if(document.body){
y=document.body.scrollTop;
x=document.body.scrollLeft;
}
}
}
}
catch(e){
}
return {x:x,y:y};
},getWholeHeight:function(){
try{
if(document.documentElement){
return document.documentElement.scrollHeight;
}else{
if(document.body){
return document.body.scrollHeight;
}
}
}
catch(e){
}
},getClientHeight:function(){
if(document.documentElement){
return document.documentElement.clientHeight;
}
}};
var _b32;
var func=function(){
var _b34=_b2f.getPageScroll().y+_b2f.getClientHeight();
var _b35=_b2f.getWholeHeight();
if(!func.loading&&_b34===_b35&&_b32!==_b35){
XN.events.fireEvent("scrollbottom");
}
_b32=_b34;
};
XN.event.addEvent(window,"scroll",func);
})();
XN.app.statsMaster={init:function(){
var j={ID:XN.cookie.get("id"),R:encodeURIComponent(location.href)};
var json=XN.JSON.build(j);
this.listener=function(e){
var e=e||window.event,_X=XN.event.pointerX(e),Y=XN.event.pointerY(e),U,T,el=XN.event.element(e),_b3e=$("dropmenuHolder");
xx=XN.element.realLeft(_b3e);
if(!(el&&el.tagName)){
return;
}
T=el.tagName.toLowerCase();
if(T=="a"){
U=el.href;
}
var _t=el.getAttribute("stats");
if(_t){
T=_t;
}
j.X=_X-xx;
j.Y=Y;
if(U){
j.U=encodeURIComponent(U);
}
if(T){
j.T=T;
}
json=XN.JSON.build(j);
new Image().src="http://dj."+XN.env.domain+"/click?J="+json+"&t="+Math.random();
};
XN.event.addEvent(document,"mousedown",this.listener);
if(!window.statisFocusEventAdded){
XN.event.addEvent(window,"focus",function(){
new Image().src="http://dj."+XN.env.domain+"/focus?J="+json+"&t="+Math.random();
});
window.statisFocusEventAdded=true;
}
if(!window.statisBlurEventAdded){
XN.event.addEvent(window,"blur",function(){
new Image().src="http://dj."+XN.env.domain+"/unfocus?J="+json+"&t="+Math.random();
});
window.statisBlurEventAdded=true;
}
if(!window.statisBottomEventAdded){
XN.events.addEvent("scrollbottom",function(){
new Image().src="http://dj."+XN.env.domain+"/scrollbottom?J="+json+"&t="+Math.random();
});
window.statisBottomEventAdded=true;
}
},destroy:function(){
XN.event.delEvent(document,"mousedown",this.listener);
}};
XN.dom.ready(function(){
XN.app.statsMaster.init();
});
XN.dom.ready(function(){
var _b40=false;
var _b41=true;
XN.event.addEvent(document,"mousedown",function(){
_b41=false;
});
XN.event.addEvent(window,"blur",function(){
_b41=true;
});
showConfirmDialog=function(){
var d=XN.DO.alert({title:"\u8bf7\u9886\u53d6\u60a8\u7684"+XN.env.siteName+"\u901a\u884c\u8bc1",modal:true,message:"<iframe id=\"frameactive\" width=\"410\" height=\"100%\" frameborder=\"no\" scrolling=\"no\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" src=\"about:blank\" ></iframe>",width:454,params:{showCloseButton:true},callBack:function(){
_b40=false;
showConfirmDialog.fireEvent("close");
}});
arguments.callee.dialog=d;
d.footer.hide();
$("frameactive").src="http://channel."+XN.env.domain+"/confirm/show";
};
XN.event.enableCustomEvent(showConfirmDialog);
var _b43=setInterval(function(){
if(_b41||window.noConfirmWindow||_b40||!XN.cookie.get("noconfirm")){
return;
}
_b40=true;
XN.cookie.del("noconfirm","/",XN.env.domain);
XN.cookie.del("noconfirm","/",window.location.hostname);
showConfirmDialog();
},1000);
XN.log("\u672a\u6fc0\u6d3b\u7528\u6237\u5f15\u5bfc\u521d\u59cb\u5316over");
});
var GuidBar={bar:null,list:[],addBar:function(){
if(window!=top||this.bar!=null){
return;
}
new XN.net.xmlhttp({url:"http://browse."+XN.env.domain+"/peoplebar.do?ran="+Math.random(),method:"get",onSuccess:function(r){
var _b45=XN.json.parse(r.responseText);
if(_b45.list.length>0){
GuidBar.buildStruts(_b45);
}
}});
},buildStruts:function(obj){
this.list=obj.list;
var _b47=["<div class=\"doing clearfix\">","<div class=\"userinfo clearfix\">","<a href=\"http://www."+XN.env.domain+"/profile.do?id="+obj.user.id+"\" class=\"avatar\">","<img src=\""+obj.user.head+"\" />","</a>","<h3>"+obj.user.name+"\uff0c\u4f60\u597d\uff01</h3>","<p>\u5f00\u59cb\u627e\u4f60\u7684\u597d\u53cb\u5427:</p>","</div>","<div class=\"users\">","<div class=\"arrow\"></div>","<ul></ul>","<div class=\"more\"><a href=\"http://friend."+XN.env.domain+"/myfriendlistx.do?_ua_flag=42&ref=guide_bar_more#item_1\">\u66f4\u591a &raquo;</a></div>","</div>","</div>"].join("");
var _b48=this.bar=document.createElement("div");
_b48.className="guide-top";
_b48.innerHTML=_b47;
var _b49=_b48.getElementsByTagName("ul")[0];
for(var i=0,_b4b=Math.min(this.list.length,5);i<_b4b;i++){
_b49.appendChild(this.getFriend());
}
var _b4c=$("navBar")||document.body.firstChild;
_b4c.parentNode.insertBefore(_b48,_b4c);
},getFriend:function(){
var list=this.list;
if(!list[0]){
return null;
}
var _b4e=document.createElement("li");
_b4e.className="clearfix";
_b4e.innerHTML=["<a href=\"#nogo\" class=\"shut\" title=\"\u5173\u95ed\"></a>","<span class=\"headpichold\">","<a href=\"http://www."+XN.env.domain+"/profile.do?ref=peoplebar&id="+list[0].id+"\" title=\"\u67e5\u770b"+list[0].name+"\u7684\u4e2a\u4eba\u4e3b\u9875\" target=\"_blank\">","<img src=\""+list[0].head+"\" onload=\"roundify(this)\"/>","</a>","</span>","<span>","<a href=\"http://www."+XN.env.domain+"/profile.do?ref=peoplebar&id="+list[0].id+"\" class=\"name\" target=\"_blank\">"+list[0].name+"</a>","<p><a href=\"#nogo\" onclick=\"showRequestFriendDialog('"+list[0].id+"','"+list[0].name+"','"+list[0].head+"','','sg_peoplebar');return false;\" class=\"addfriend_action\"> \u52a0\u4e3a\u597d\u53cb</a></p>","</span>"].join("");
_b4e.firstChild.onclick=this.replaceFriend;
list.splice(0,1);
return _b4e;
},replaceFriend:function(e){
e=e||window.event;
var obj=e.target||e.srcElement;
var node=obj.parentNode;
var _b52=GuidBar.getFriend();
if(_b52){
node.parentNode.replaceChild(_b52,node);
}else{
$(node).remove();
}
return false;
}};
(function(ns){
ns.imgsChecker=function(_b54,_b55){
this.imgArry=_b54;
this.filter=_b55;
if(isUndefined(this.filter.logoWidth)){
this.filter.logoWidth=88;
}
if(isUndefined(this.filter.logoHeight)){
this.filter.logoHeight=31;
}
if(!this.filter.abortSec){
this.filter.abortSec=3;
}
if(!this.filter.maxCheckCount){
this.filter.maxCheckCount=30;
}
this.init();
};
ns.imgsChecker.prototype={init:function(){
var This=this;
this.result=[];
this.count=0;
this.stopFlag=false;
var _b57=Math.min(This.filter.maxCheckCount,This.imgArry.length);
for(var i=0,j=_b57;i<j;i++){
(function(_b5a){
var img=new Image();
img.src=This.imgArry[_b5a]+"?t="+Math.random();
img.loadedTag=false;
var _b5c=setTimeout(function(){
if(This.count==This.filter.limitImgs||_b5a==_b57-1){
if(!This.stopFlag){
This.fireEvent("checkOver");
}
This.stopFlag=true;
return This.result;
}
},This.filter.abortSec*1000);
img.onload=function(){
img.loadedTag=true;
clearTimeout(_b5c);
if(This.stopFlag){
return;
}
if(This.doFilter(this)){
This.fireEvent("checkOne",this);
This.result.push(this);
}
if(This.count==This.filter.limitImgs||_b5a==_b57-1){
This.fireEvent("checkOver");
This.stopFlag=true;
return This.result;
}
};
img.onerror=function(){
This.imgArry.splice(_b5a,1);
if(This.count==This.filter.limitImgs||_b5a==This.imgArry.length){
if(!This.stopFlag){
This.fireEvent("checkOver");
}
This.stopFlag=true;
return This.result;
}
};
})(i);
}
},doFilter:function(img){
if(img.width==this.logoWidth||img.height==this.logoHeight){
this.count++;
return true;
}
if(img.width<this.filter.minWidth||img.height<this.filter.minHeight){
return false;
}
var _b5e=img.width/img.height;
var _b5f=img.height/img.width;
if(_b5e>this.filter.maxRatioWH||_b5f>this.filter.maxRatioHW){
return false;
}
this.count++;
return true;
}};
XN.event.enableCustomEvent(ns.imgsChecker.prototype);
})(XN.widgets);
XN.Bubble=function(conf){
$extend(this,conf);
this.init();
};
XN.Bubble.prototype={bs:[],init:function(){
this.getUIRef();
this.bindEvent();
},getUIRef:function(){
this.timer=null;
this.elem=$(this.IDContainer);
this.nList=$(this.elem).getElementsByTagName("section")[0];
},bindEvent:function(){
var This=this;
this.elem.addEvent("click",function(e){
e=e||window.event;
var obj=e.srcElement||e.target;
if(obj.tagName.toLowerCase()=="a"&&obj.className.indexOf("x-to-hide")>=0){
$(obj.parentNode.parentNode).remove();
if(!XN.string.trim(This.nList.innerHTML)){
This.hide();
}
}
});
this.elem.addEvent("mouseover",function(e){
This.delTimer();
});
this.elem.addEvent("mouseout",function(e){
This.startTimer();
});
this.addEvent("view_after_hide",function(){
This.clearBs();
});
this.addEvent("bubble_bs_unshifted",function(){
This.showNtfs();
This.show();
This.startTimer();
});
},unshiftBs:function(n){
this.bs.unshift(n);
this.fireEvent("bubble_bs_unshifted",n);
},clearBs:function(){
this.bs.length=0;
},showNtfs:function(){
this.nList.innerHTML=this.makeNtfs();
},show:function(){
this.elem.show();
},hide:function(){
this.elem.hide();
this.fireEvent("view_after_hide");
},makeNtfs:function(){
var html=[];
XN.array.each(this.bs,function(i,_b69){
html.push(_b69.content);
});
return html.join("");
},startTimer:function(fn){
var This=this;
this.delTimer();
this.timer=setTimeout(function(){
This.hide();
},6000);
},delTimer:function(){
if(this.timer){
clearTimeout(this.timer);
}
},setNotify:function(n){
this.unshiftBs(n);
}};
XN.event.enableCustomEvent(XN.Bubble.prototype);
XN.dom.ready(function(){
var b=$("system-notification-box");
if(!b){
return;
}
window.xn_bubble=new XN.Bubble({IDContainer:"system-notification-box"});
});
XN.pagerChannelIsOk=function(_b6e){
try{
if(!XN.disableWebpager){
var _b6f=XN.getFileVersionNum("http://s.xnimg.cn/jspro/xn.app.webpager.js").version;
var _b70=_b6e.wpVersion;
var _b71=parseInt(_b6f.substring(1));
var _b72=parseInt(_b70.substring(1));
if(_b70&&_b72>_b71){
XN.loadFile("http://s.xnimg.cn/"+_b6e.wpVersion+"/jspro/xn.app.webpager.js");
}else{
XN.loadFile("http://s.xnimg.cn/jspro/xn.app.webpager.js");
}
}
}
catch(e){
}
};
if(/\((iPhone|iPad|iPod)/i.test(navigator.userAgent)){
XN.disableWebpager=true;
}
function nullOrNoneLog(data){
var _b74="";
for(var i in data){
_b74=_b74+"&"+i+"="+encodeURIComponent(data[i]);
}
var _b76=new Image().src="http://123.125.44.44/r/?t="+new Date().getTime()+_b74;
}
object.add("xn.mention",function(_b77){
var _b78=this.Mention=function(){
this.author="chuanye.wang@foxmail.com";
this.reg=/@[^@\s\)]{0,20}$/;
this.input=null;
this.ugcId="";
this.ugcType="";
this.ownerId="";
this.popTop=false;
this.scrollable=false;
this.titles={0:"\u60f3\u7528@\u63d0\u5230\u8c01\uff1f(\u6700\u591a10\u6b21)",1:"\u7531\u4e8e\u9690\u79c1\u8fd9\u91cc\u53ea\u80fd@\u5171\u540c\u597d\u53cb(\u6700\u591a10\u6b21)",2:"\u7531\u4e8e\u9690\u79c1\u8fd9\u91cc\u4e0d\u80fd\u4f7f\u7528@",3:"\u676f\u5177\u4e86\uff0c\u7f51\u7edc\u9519\u8bef\u6682\u65f6\u4e0d\u80fd@\u4e86:(",4:"\u9009\u62e9\u6700\u8fd1@\u8fc7\u7684\u670b\u53cb\uff0c\u6216\u7ee7\u7eed\u8f93\u5165\u59d3\u540d(\u6700\u591a10\u6b21)"};
extendObject(this,arguments[0]);
XN.event.enableCustomEvent(this);
};
_b78.init=function(list){
for(var i=0;i<list.length;i++){
(function(){
var obj=list[i].obj,_b7c=list[i].ugcId||"",_b7d=list[i].ugcType||"",_b7e=list[i].ownerId||"",_b7f=list[i].scrollable||false,_b80=list[i].popTop||false,_b81=list[i].whisper||true,_b82=list[i].button||null;
if(obj.mention||(obj.tagName.toLowerCase()!="input"&&obj.tagName.toLowerCase()!="textarea")){
return;
}
if(XN.browser.IE){
obj.style.fontFamily=document.body.currentStyle.fontFamily;
obj.style.fontSize=document.body.currentStyle.fontSize;
}
obj=$(obj);
if(!obj.mention){
obj.mention=new _b78({input:obj,ugcId:_b7c,ugcType:_b7d,ownerId:_b7e,scrollable:_b7f,popTop:_b80,whisper:_b81,button:_b82});
}
obj.addEvent("keyup",function(_b83){
obj.mention.check();
obj.mention.doNotCheck=false;
});
obj.addEvent("mouseup",function(_b84){
obj.mention.check();
});
obj.addEvent("focus",function(){
obj.mention.check();
});
obj.addEvent("keydown",function(_b85){
if(_b85.keyCode==13&&obj.mention.noMatch){
obj.mention.selector.menu.hide();
}
if((_b85.keyCode==13||_b85.keyCode==38||_b85.keyCode==40)&&obj.mention.selectorShow&&!obj.mention.noMatch){
obj.mention.doNotCheck=true;
XN.event.stop(_b85);
obj.mention.selector._inputOnkeydown(_b85);
}
});
if(obj.mention.button){
XN.event.addEvent(obj.mention.button,"click",function(){
obj.focus();
setTimeout(function(){
var v=obj.value,nv=v+"@";
obj.value=nv;
obj.focus();
obj.mention.check();
},100);
});
}
})();
}
};
_b78.prototype={key:"",keyIndex:"",front:"",last:"",flag:null,atPos:{},curPos:null,masker:null,selector:null,selectorShow:false,doNotCheck:false,noMatch:false,fsInput:null,privacy:"haveNotCheck",tip:null,log:function(lg){
if(console&&console.log){
console.log(lg);
}
},check:function(){
if(this.doNotCheck){
return;
}
this.initSelector();
if(!this.selector){
return;
}
if(this.isChecking){
return;
}
this.isChecking=true;
var _b89=$("whisper");
if(_b89&&this.whisper){
if(_b89.checked){
this.privacy=2;
}else{
this.privacy=this.oldPrivacy;
}
this.renewTip();
if(!/@.+\(\d+\)\s/.test(this.input.value)){
$(_b89).disabled=false;
$(_b89.parentNode).title="";
}else{
if(!_b89.checked){
$(_b89).disabled=true;
$(_b89.parentNode).title="\u4eb2\uff01\uff01\uff01\u4f60\u7528@\u4e86\uff01\uff01\uff01\u6709\u6728\u6709\uff01\uff01\uff01@\u522b\u4eba\u5c31\u4e0d\u80fd\u7528\u6084\u6084\u8bdd\u4e86\u554a\u4eb2\uff01\uff01\uff01";
}
}
}
this.curPos=this.getCurPos();
var key=this.input.value.substring(0,this.curPos).match(this.reg);
if(key){
this.key=key[0].slice(1);
this.keyIndex=key.index;
this.front=this.input.value.substring(0,this.keyIndex);
this.setContent();
this.atPos={X:this.flag.realLeft()-this.masker.scrollLeft+2,Y:this.flag.realTop()-this.masker.scrollTop+this.flag.offsetHeight+4};
var fire={key:this.key,pos:this.atPos};
if(this.privacy!=0&&this.privacy!=1){
this.selector.menu.show();
}else{
this.fsInput.value=this.key;
this.selector._startCheck();
this.selector.menu.show();
}
this.renewTip();
if(key[0]=="@"){
if(XN.user.recentAt&&this.privacy==0){
this.selector._buildMenu(XN.user.recentAt);
XN.element.delClass(this.selector._currentLi,this.selector.getConfig("liHoverClass"));
this.selector._currentLi=null;
this.renewTip(4);
}
}
this.locateMenu();
this.selectorShow=true;
this.fireEvent("atInputed",fire);
}else{
this.fsInput.value="";
this.selector.menu.hide();
this.selectorShow=false;
this.fireEvent("noAtNow");
}
this.isChecking=false;
},getCss:function(){
var el=this.input;
if(window.getComputedStyle){
var _b8d=window.getComputedStyle(el,null);
}else{
var _b8d=el.currentStyle;
}
return _b8d;
},getCurPos:function(){
var ele=this.input;
var cPos=0;
if(XN.browser.IE&&ele.tagName.toLowerCase()=="input"){
var _b90=document.selection.createRange();
var _b91=ele.createTextRange();
_b91.collapse(true);
_b91.select();
var _b92=document.selection.createRange();
_b92.setEndPoint("EndToEnd",_b90);
cPos=_b92.text.length;
_b90.select();
}else{
try{
cPos=XN.form.help(ele).cursorPosition().start;
}
catch(E){
cPos=0;
}
}
return cPos;
},mask:function(){
if(this.masker){
this.locateMasker();
return;
}
this.appendMasker();
this.locateMasker();
},appendMasker:function(){
this.masker=$element("div");
var s=this.getCss();
var _b94=this.input.tagName.toLowerCase()=="input";
var fix;
if(XN.browser.IE){
fix=4;
}else{
fix=2;
}
if(this.scrollable){
this.masker.style.cssText="width:"+s.width+";"+"box-sizing:"+s.boxSizing+";"+"padding-left:"+s.paddingLeft+";"+"padding-right:"+s.paddingRight+";"+"height:"+this.input.clientHeight+"px;"+"line-height:"+s.lineHeight+";"+"border-left-style:"+s.borderLeftStyle+";"+"border-right-style:"+s.borderRightStyle+";"+"border-top-style:"+s.borderTopStyle+";"+"border-bottom-style:"+s.borderBottomStyle+";"+"border-left-width:"+s.borderLeftWidth+";"+"border-right-width:"+s.borderRightWidth+";"+"border-top-width:"+s.borderTopWidth+";"+"border-bottom-width:"+s.borderBottomWidth+";"+"border-left-color:"+s.borderLeftColor+";"+"border-right-color:"+s.borderRightColor+";"+"border-top-color:"+s.borderTopColor+";"+"border-bottom-color:"+s.borderBottomColor+";"+"overflow-y:hidden;"+"overflow-x:hidden;"+"font-size:"+s.fontSize+";"+"font-weight:"+s.fontWeight+";"+"font-family:"+s.fontFamily+";"+"font-style:"+s.fontStyle+";"+"word-wrap:"+(_b94?"normal":"break-word")+";"+"z-index:-1000;position:absolute;visibility:hidden";
}else{
this.masker.style.cssText="width:"+(this.input.clientWidth-fix)+"px;"+"padding-left:"+s.paddingLeft+";"+"padding-right:"+(XN.browser.IE?"0px":s.paddingRight)+";"+"height:"+this.input.clientHeight+"px;"+"line-height:"+s.lineHeight+";"+"border-left-style:"+s.borderLeftStyle+";"+"border-right-style:"+s.borderRightStyle+";"+"border-top-style:"+s.borderTopStyle+";"+"border-bottom-style:"+s.borderBottomStyle+";"+"border-left-width:"+s.borderLeftWidth+";"+"border-right-width:"+s.borderRightWidth+";"+"border-top-width:"+s.borderTopWidth+";"+"border-bottom-width:"+s.borderBottomWidth+";"+"border-left-color:"+s.borderLeftColor+";"+"border-right-color:"+s.borderRightColor+";"+"border-top-color:"+s.borderTopColor+";"+"border-bottom-color:"+s.borderBottomColor+";"+"overflow-y:hidden;"+"overflow-x:hidden;"+"font-size:"+s.fontSize+";"+"font-weight:"+s.fontWeight+";"+"font-family:"+s.fontFamily+";"+"font-style:"+s.fontStyle+";"+"word-wrap:"+(_b94?"normal":"break-word")+";"+"z-index:-1000;position:absolute;visibility:hidden";
}
if(_b94){
this.masker.style.whiteSpace="nowrap";
}
document.body.appendChild(this.masker);
},locateMasker:function(){
this.masker.style.left=$(this.input).realLeft()+"px";
this.masker.style.top=$(this.input).realTop()+4+"px";
},setContent:function(){
this.mask();
var _b96=$element("span"),_b97=$element("span"),_b98=$element("span");
this.flag=_b97;
_b96.innerHTML=this.parse(this.front);
_b97.innerHTML="@";
_b98.innerHTML=this.key;
this.masker.innerHTML="";
if(this.input.tagName.toLowerCase()=="input"){
_b96.style.cssText="white-space:nowrap;";
_b97.style.cssText="white-space:nowrap;";
_b98.style.cssText="white-space:nowrap;";
}
this.masker.appendChild(_b96);
this.masker.appendChild(_b97);
this.masker.appendChild(_b98);
if(this.input.scrollHeight>this.input.clientHeight){
this.masker.style.overflowY="scroll";
}
if(this.input.scrollHeight<=this.input.clientHeight){
this.masker.style.overflowY="hidden";
}
this.masker.scrollLeft=this.masker.scrollWidth;
this.masker.scrollTop=this.masker.scrollHeight;
},parse:function(v){
var sp=XN.browser.IE?("<pre style=\"font-family:"+this.getCss().fontFamily+";font-size:"+this.getCss().fontSize+";display: inline; word-wrap: break-word; overflow: hidden\"> </pre>"):("<span style=\"white-space: pre-wrap;font-family:"+this.getCss().fontFamily+";font-size:"+this.getCss().fontSize+";\"> </span>");
var h={" ":((this.input.tagName.toLowerCase()=="input")?"&nbsp;":sp),"\r":"","\n":"<br />"};
var reg=/\r|\n| /gi;
return v.replace(reg,function(k){
return h[k];
});
},getRecent:function(){
if(XN.user.recentAt){
return;
}
var that=this;
new XN.net.xmlhttp({url:"http://status.renren.com/GetMetion.do?userId="+XN.user.id+"&limit=6&flag=1&offset=0",method:"get",onSuccess:function(r){
if(XN.user.recentAt){
return;
}
if(r.responseText=="{}"){
return;
}
var r=XN.json.parse(r.responseText);
if(r.code!=0||r.result.length<1){
return;
}
XN.user.recentAt=r.result;
that.check();
}});
},newSelector:function(ps){
var that=this;
var _ba2=["<div class=\"mentionFrdList\">","<div class=\"m-autosug-minwidth\">","<div class=\"m-autosug-content\">","<div class=\"mention-tip\"><span>",that.titles[that.privacy],"</span></div>","<ul class=\"search-Result\" style=\"overflow:hidden;\"></ul>","</div>","</div>","</div>"].join("");
this.selector=new XN.ui.friendSelector({url:ps.url,id:ps.id,autoSelectFirst:true,limit:ps.limit,param:ps.param,noResult:function(){
that.noMatch=true;
return "\u6ca1\u6709\u5339\u914d\u7ed3\u679c";
},noInput:null,wrapper:_ba2});
var _ba3=this.selector;
if(this.popTop){
_ba3.menu=new XN.ui.menu({button:that.selector.input,menu:that.selector._menuList,fireOn:"manual",alignType:"1-4",offsetY:-17});
}
_ba3.buildMenu=function(r){
return "<img src=\""+(r.head||r.headUrl)+"\" width=\"30\" height=\"30\" alt=\""+r.name+"\"/>"+"<strong style=\"white-space:nowrap\">"+r.name+"</strong>";
};
_ba3._buildMenu=function(_ba5){
var This=_ba3;
This.result=_ba5;
if(_ba5.length>0){
This.fireEvent("hasResult");
}
if(_ba5.length==0){
This.fireEvent("noResult");
var _ba7=This.getConfig("noResult");
if(isFunction(_ba7)){
_ba7=_ba7.call(This);
}
This._ul.innerHTML="<li>"+_ba7+"</li>";
This.menu.show();
This.fireEvent("menuBuilt");
This._currentLi=null;
return;
}
var lis=[];
lis.push(This.firstMenuItem());
var len=_ba5.length-1;
XN.array.each(_ba5,function(i,v){
lis.push("<li onmouseover=\"getCompleteMenu("+This._MID+")._highlightMenuItem(this);\" aid=\""+i+"\">"+This.buildMenu(v)+"</li>");
});
lis.push(This.lastMenuItem());
This._ul.innerHTML=lis.join("");
if(This.getConfig("autoSelectFirst")){
This._highlightMenuItem(This._ul.firstChild);
}
This.menu.show();
This.fireEvent("menuBuilt");
};
_ba3._startCheck=function(){
var This=_ba3;
if(This._userInput){
This._userInput=false;
return;
}
This._checkInput();
};
_ba3._endCheck=function(){
_ba3._lastInput="";
_ba3._ul.innerHTML="";
return;
};
_ba3.loadFriends=function(r){
if(_ba3.isLoading()){
return;
}
_ba3._isLoading=true;
_ba3._onload();
};
_ba3._onload=function(){
_ba3.isLoading=false;
_ba3._ready=true;
_ba3.DS=new XN.util.DS_friends({url:_ba3.getConfig("url"),qkey:_ba3.getConfig("qkey"),limit:_ba3.getConfig("limit"),page:_ba3.getConfig("page"),param:_ba3.getConfig("param")});
_ba3.DS.query=function(v,_baf){
var This=this;
try{
this._request.abort();
}
catch(e){
}
function parseDS_JSON(r){
r=r.responseText;
var pp;
try{
var rt=XN.JSON.parse(r);
if(This.rootKey&&rt[This.rootKey]){
pp=rt[This.rootKey];
}else{
pp=rt;
}
}
catch(e){
pp=[];
}
_baf(pp);
}
var _bb4=XN.json.parse(this.param);
this._request=new XN.net.xmlhttp({url:this.url,data:"q="+encodeURIComponent(v)+"&l="+this.limit+(!!_bb4.friendId?("&friend="+_bb4.friendId):""),method:this.method,onSuccess:parseDS_JSON});
};
};
this.bindEvent();
this.getRecent();
},buildValue:function(p){
this.last=this.input.value.substring(this.curPos);
this.input.value=this.front+"@"+p.name+"("+(p.id||p.userId)+")"+" "+this.last;
this.refocus(p);
},refocus:function(p){
var that=this;
var name=p.name,id=p.id||p.userId;
var _bba=this.front.length+1+name.length+id.toString().length+3;
var cst=this.input.scrollTop;
this.fsInput.value="";
setTimeout(function(){
XN.form.help(that.input).focus(_bba);
that.input.scrollTop=cst;
that.selector._endCheck();
that.selector.menu.hide();
that.selectorShow=false;
that.fireEvent("refocus");
},0);
},bindEvent:function(){
var that=this;
this.selector.addEvent("select",function(p){
that.buildValue(p);
that.doNotCheck=false;
});
this.selector.addEvent("hasResult",function(){
that.noMatch=false;
});
this.selector.addEvent("noinput",function(){
that.noMatch=true;
that.selector._ul.innerHTML="";
that.selector.menu.show();
});
$(this.input).addEvent("blur",function(){
if(that.selector){
that.selector._endCheck();
that.selector.menu.hide();
}
});
if(this.popTop){
this.selector.addEvent("menuBuilt",function(){
that.locateMenu();
});
}
if($("whisper")&&this.whisper){
if(!this.oldPrivacy){
this.oldPrivacy=this.privacy;
}
$("whisper").addEvent("click",function(){
if($("whisper").checked){
that.privacy=2;
}else{
that.privacy=that.oldPrivacy;
}
that.renewTip();
});
}
},renewTip:function(t){
var tip=Sizzle(".mention-tip span",this.selector._ul.parentNode)[0];
tip.innerHTML=this.titles[t]||this.titles[this.privacy];
},crFsInput:function(){
if(!this.fsInput){
this.fsInput=$element("input");
this.fsInput.type="text";
this.fsInput.style.cssText="position:"+((this.scrollable&&!XN.browser.IE6)?"fixed":"absolute")+";z-index:-1000;border:0 none;padding:0;height:0;overflow:hidden;";
document.body.appendChild(this.fsInput);
}
},locateMenu:function(){
this.fsInput.style.left=this.atPos.X+"px";
this.fsInput.style.top=this.atPos.Y+"px";
this.selector.menu.refresh();
if(this.scrollable){
var el=this.selector._menuList;
var fix=XN.browser.IE6?0:$("dropmenuHolder").realLeft();
if(!XN.browser.IE6){
el.style.position="fixed";
}
el.style.left=parseInt(el.style.left)+fix+"px";
if(XN.browser.IE6){
if(!el["scEvent4At"]){
var that=this;
XN.event.addEvent(window,"scroll",function(){
setTimeout(function(){
that.check();
},500);
});
el["scEvent4At"]=true;
}
}
}
},initSelector:function(){
this.crFsInput();
if(this.selector){
return;
}
var that=this;
var cb=function(){
var fid=that.getFinalId(),surl="http://sg.renren.com/s/c",par={"friendId":fid};
if(fid==""){
surl="http://sg.renren.com/s/f";
par={};
}
that.newSelector({url:surl,id:that.fsInput,limit:10,friendId:fid,param:par});
that.selector.loadFriends();
};
this.getPrivacy(cb);
},getFinalId:function(){
if(this.privacy==0){
return "";
}
if(this.privacy==1){
return this.ownerId;
}
if(this.privacy!=0&&this.privacy!=1){
return -1;
}
},getPrivacy:function(cb){
if(this.privacy!="haveNotCheck"){
return;
}
if((this.ugcType=="blog"||this.ugcType=="photo"||this.ugcType=="album"||this.ugcType=="gossip")){
this.doNotCheck=true;
var that=this;
var _bca={"blog":"http://blog.renren.com/blog/"+this.ownerId+"/"+this.ugcId+"/privacy","photo":"http://photo.renren.com/photo/"+this.ownerId+"/photo-"+this.ugcId+"/privacy","album":"http://photo.renren.com/photo/"+this.ownerId+"/album-"+this.ugcId+"/privacy","gossip":"http://www.renren.com/getPrivacy/update?uid="+this.ownerId};
if(this.ugcType=="gossip"){
new XN.net.xmlhttp({url:_bca[this.ugcType],onSuccess:function(r){
var j=r.responseText;
if(j==0||j==3){
that.privacy=1;
}else{
if(j==-1){
that.privacy=2;
}else{
that.privacy=0;
}
}
if(that.privacy==1&&XN.user.id==that.ownerId){
that.privacy=0;
}
cb();
that.doNotCheck=false;
that.check();
},onError:function(){
that.privacy=3;
cb();
that.doNotCheck=false;
that.check();
}});
}else{
new XN.net.xmlhttp({url:_bca[this.ugcType],method:"get",onSuccess:function(r){
var j=XN.json.parse(r.responseText);
that.privacy=j.privacyLevel;
if(that.privacy==1&&XN.user.id==that.ownerId){
that.privacy=0;
}
cb();
that.doNotCheck=false;
that.check();
},onError:function(){
that.privacy=3;
cb();
that.doNotCheck=false;
that.check();
}});
}
}else{
if(this.ugcType=="unknown_privacy"){
this.privacy=2;
cb();
}else{
if(window.asyncHTMLManager&&window.asyncHTMLManager.location.href.indexOf("http://share.renren.com/share/collection")!=-1&&this.ugcType=="share"){
this.privacy=2;
cb();
}else{
this.privacy=0;
cb();
}
}
}
},showTip:function(){
return;
if(XN.cookie.get("at")){
return;
}
var d=$("mentionTip");
var that=this;
if(!d){
var d=$element("div");
d.id="mentionTip";
d.style.cssText="position:absolute;top:-9999px;left:-9999px;width:300px;height:33px;";
document.body.appendChild(d);
d.innerHTML="<div class=\"mention-guide-tip\">"+"<div class=\"tip-content\">"+"\u8fd9\u91cc\u53ef\u4ee5\u8f93\u5165<span style=\"font-weight:bold\">\u201c@\u59d3\u540d\u201d</span>\u6765\u5411\u597d\u53cb\u70b9\u540d\u5566\uff01"+"<a href=\"#nogo\" onclick=\"return false;\" class=\"x-to-hide\" id=\"mentionHideTip\"></a>"+"</div>"+"<div class=\"tip-arrow\"></div>"+"</div>";
$(Sizzle("#mentionTip .x-to-hide")[0]).addEvent("click",function(e){
XN.event.stop(e);
that.hideTip();
});
}
setTimeout(function(){
if(_b78.mentionTipTimer){
clearInterval(_b78.mentionTipTimer);
}
_b78.tip=that.tip=new XN.UI.fixPositionElement({id:d,alignType:"1-4",alignWith:that.input,useIframeInIE6:false});
_b78.mentionTipTimer=setInterval(function(){
if(that.tip&&that.tip._isShow){
that.tip.refresh();
}else{
clearInterval(_b78.mentionTipTimer);
}
},100);
},200);
},hideTip:function(){
if(this.tip){
XN.cookie.set("at",1,9999,"/","renren.com");
this.tip.hide();
this.tip=null;
}
}};
});
object.use("xn.mention",function(_bd2,xn){
window.Mention=xn.mention.Mention;
});
object.add("xn.appsDropMenu","dom, events, ua",function(_bd4,dom,_bd6,ua){
var _bd8=XN.element.hasClassName;
var _bd9=XN.element.addClass;
var _bda=XN.element.delClass;
var _bdb=XN.element.realLeft;
var _bdc=XN.element.realTop;
var _bdd=6;
var _bde=32;
var _bdf=12;
var _be0=1;
var _be1=0;
var _be2=null;
var _be3=false;
var _be4=[];
var _be5=0;
var _be6=null;
this.dropInit=function(){
this.oAppDropMenu=$("appDropMenu");
this.oAppsWrap=$("appsMenuPro");
var that=this;
if(!this.oAppDropMenu||!this.oAppsWrap){
return;
}
this.oAppDropMenu.addEvent("mouseover",function(e){
if(window.appsMenuHideTimer){
clearTimeout(window.appsMenuHideTimer);
window.appsMenuHideTimer=null;
}
window.appsMenuShowTimer=setTimeout(function(){
showAppsMenu(e);
},200);
},false);
this.oAppDropMenu.addEvent("mouseleave",function(e){
if(window.appsMenuHideTimer){
clearTimeout(window.appsMenuHideTimer);
window.appsMenuHideTimer=null;
}
if(window.appsMenuShowTimer){
clearTimeout(window.appsMenuShowTimer);
window.appsMenuShowTimer=null;
}
if(XN.browser.IE){
if(this.contains(e.toElement)){
return;
}
}
hideAppsMenu(e);
});
this.oAppsWrap.addEvent("mouseover",function(e){
if(window.appsMenuHideTimer){
clearTimeout(window.appsMenuHideTimer);
window.appsMenuHideTimer=null;
}
},false);
this.oAppsWrap.addEvent("mouseout",function(e){
if(XN.browser.IE){
if(this.contains(e.toElement)){
return;
}
}
hideAppsMenu(e);
},false);
function showAppsMenu(e){
var oNav=Sizzle(".navigation-wrapper",$("navBar"))[0];
if(that.oAppsWrap.children.length==0&&!window.AppsDropMenu._loaded){
window.AppsDropMenu._loaded=true;
new XN.net.xmlhttp({url:"http://apps.renren.com/menu/getNavHtml",method:"get",onSuccess:function(r){
that.oAppsWrap.innerHTML=r.responseText;
that.oAppsWrap.style.left=$("logo2").offsetWidth+"px";
that.oAppsWrap.style.top=oNav.offsetHeight+XN.element.realTop(oNav)+"px";
that.init();
},onError:function(r){
XN.DO.showError("\u8bf7\u6c42\u5e94\u7528\u5217\u8868\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5...");
window.AppsDropMenu._loaded=false;
}});
}else{
that.oAppsWrap.style.left=$("logo2").offsetWidth+"px";
that.oAppsWrap.style.top=oNav.offsetHeight+XN.element.realTop(oNav)+"px";
}
if(window.appsMenuShowTimer){
clearTimeout(window.appsMenuShowTimer);
window.appsMenuShowTimer=null;
}
}
function hideAppsMenu(e){
window.appsMenuHideTimer=setTimeout(function(){
$("appsMenuPro").style.left="-9999px";
$("appsMenuPro").style.top="-9999px";
},200);
}
};
this.init=function(){
this.oMyAppsWrap=Sizzle(".my-fav-apps",this.oAppsWrap)[0];
this.oOtherAppsWrap=Sizzle(".other-apps",this.oAppsWrap)[0];
this.oAppItems=Sizzle("li.app-item",this.oAppsWrap);
this._bindEvents();
this.pageCtrl(1);
};
this._bindEvents=function(){
var that=this;
this.oAppsWrap.addEvent("click",function(e){
var _bf3=XN.event.element(e);
var _bf4=_bf3.nodeName.toLowerCase();
if(_bf4=="em"){
e.preventDefault();
that.manageFavApp(_bf3);
}
if(_bf4=="a"&&that.getParent(_bf3,"div.page-ctrl")){
e.preventDefault();
if(_bd8(_bf3,"page-pre")){
if(_be0>1&&!_bd8(_bf3,"disable")){
that.pageCtrl(_be0-1);
}
}else{
if(_bd8(_bf3,"page-next")){
if(_be0<3&&!_bd8(_bf3,"disable")){
that.pageCtrl(_be0+1);
}
}else{
if(_bd8(_bf3,"page-1")){
if(_be0!=1){
that.pageCtrl(1);
}
}else{
if(_bd8(_bf3,"page-2")){
if(_be0!=2){
that.pageCtrl(2);
}
}else{
if(_bd8(_bf3,"page-3")){
if(_be0!=3){
that.pageCtrl(3);
}
}
}
}
}
}
}
},false);
this.oAppsWrap.delegate("li.app-item-dragging","mouseout",function(e){
if(!_be3){
return;
}
var _bf6=that.getParent(XN.event.element(e),"li");
if(_be3&&_bf6==_be2){
that.resetDraggingItemPos(e);
}
},false);
this.oAppsWrap.delegate("li.app-item a","mousedown",function(e){
e.preventDefault();
that.dragStart(e);
},false);
$(document.body).addEvent("mousemove",function(e){
that.dragProcess(e);
},false);
this.oAppsWrap.addEvent("mouseup",function(e){
that.dragEnd(e);
},false);
$(document.body).addEvent("click",function(e){
var _bfb=XN.event.element(e);
var _bfc=that.getParent(_bfb,"li");
_be5==0;
if(_bfc&&_bfc.getAttribute("data-dragging")){
e.preventDefault();
_bfc.removeAttribute("data-dragging");
}
},false);
if(ua.ua.ie==6){
this.oAppsWrap.delegate("li.app-item a","mouseover",function(e){
var _bfe=XN.event.element(e);
Sizzle("em",this)[0].style.display="block";
if(_bfe.nodeName.toLowerCase()=="em"){
if(that.oMyAppsWrap.contains(_bfe)){
_bfe.style.backgroundPosition="-19px -19px";
}else{
_bfe.style.backgroundPosition="0 -19px";
}
}
},false);
this.oAppsWrap.delegate("li.app-item a","mouseout",function(e){
var _c00=XN.event.element(e);
if(_c00.nodeName.toLowerCase()=="em"){
if(that.oMyAppsWrap.contains(_c00)){
_c00.style.backgroundPosition="-19px 0";
}else{
_c00.style.backgroundPosition="0 0";
}
}
if(this.contains(e.toElement)){
return;
}else{
Sizzle("em",this)[0].style.display="none";
}
},false);
}
};
this.bindDragDropEvent=function(){
for(var i=0,len=this.oAppItems.length;i<len;i++){
this.oAppItems[i].ondragstart=function(e){
};
}
this.oMyAppsWrap.ondragenter=function(e){
};
this.oMyAppsWrap.ondragover=function(e){
};
$("dropHereTest").ondrop=function(e){
alert("fav drop");
};
};
this.manageFavApp=function(_c07){
var _c08=this.getParent(_c07,"li");
if(_bd8(_c07,"cancel-fav")){
this.cancelFav(_c08);
}else{
if(_bd8(_c07,"to-fav")){
this.fav(_c08);
}
}
};
this.fav=function(_c09){
var _c0a=_c09.cloneNode(true);
var _c0b=this.oMyAppsWrap;
var _c0c=Sizzle("ul.apps-list",_c0b)[0];
var _c0d=Sizzle("li.app-item-empty",_c0b);
var _c0e=Sizzle("li[data-holder]",_c0b)[0];
var oBtn=Sizzle("em",_c0a)[0];
var oTip=Sizzle("h4",_c0b)[0];
var _c11=Sizzle("li.app-item",_c0b).length;
var _c12=[];
var _c13=_c09.getAttribute("data-aid");
if(_c11>=_bdd){
var _c14=Sizzle("li.app-item",_c0c)[_c11-1];
var _c15=Sizzle("ul.apps-list",this.oOtherAppsWrap)[0];
var _c16=Sizzle("em",_c14)[0];
_c14.style.display="";
_c15.insertBefore(_c14,_c15.firstChild);
_c14.setAttribute("data-faved","f");
_c16.className="to-fav";
_c16.setAttribute("title","\u7f6e\u9876");
}
if(_c11>=3){
oTip.style.display="none";
}
oBtn.className="cancel-fav";
oBtn.setAttribute("title","\u53d6\u6d88\u7f6e\u9876");
if(this.cancelFavTimer){
this.clearCancelFavTimer();
}
_c0a.setAttribute("data-faved","t");
if(_c0e){
_c0c.replaceChild(_c0a,_c0e);
}else{
_c0c.insertBefore(_c0a,_c0c.firstChild);
if(_c0d[0]){
$(_c0d[0]).remove();
}
}
$(_c09).remove();
this.pageCtrl(_be0);
_c12="["+this.getFavOrder(_c0a).join(",")+"]";
_c13=_c0a.getAttribute("data-aid");
new XN.net.xmlhttp({url:"http://apps.renren.com/menu/reorderBookmark.do",method:"post",data:"app_id="+_c13+"&app_ids="+_c12,onSuccess:function(r){
},onError:function(r){
}});
if(ua.ua.ie==6){
Sizzle("em",_c0a)[0].style.display="none";
Sizzle("em",_c0a)[0].style.backgroundPosition="-19px 0";
}
};
this.cancelFav=function(_c19){
var _c1a=this.oMyAppsWrap;
var _c1b=Sizzle("ul.apps-list",_c1a)[0];
var _c1c=this.oOtherAppsWrap;
var _c1d=Sizzle("ul.apps-list",_c1c)[0];
var _c1e=_c19.cloneNode(true);
var _c1f=parseInt(_c19.getAttribute("data-aid"));
var _c20=parseInt(_c19.getAttribute("data-order"));
var oBtn=Sizzle("em",_c1e)[0];
var oTip=Sizzle("h4",_c1a)[0];
var _c23=Sizzle("li.app-item",_c1a).length;
var apps=Sizzle("li.app-item",_c1c);
var _c25=apps.length;
var _c26=1;
var _c27=_c25;
if(this.cancelFavTimer){
this.clearCancelFavTimer();
}
oBtn.className="to-fav";
oBtn.setAttribute("title","\u7f6e\u9876");
_c1e.setAttribute("data-faved","f");
for(var i=0,len=apps.length;i<len;i++){
if(_c20<parseInt(apps[i].getAttribute("data-order"))){
_c27=i;
break;
}
}
_c26=Math.ceil((_c27+1)/12);
if(_c27<_c25){
_c1d.insertBefore(_c1e,apps[_c27]);
}else{
_c1d.appendChild(_c1e);
}
this.pageCtrl(_be0);
_c19.innerHTML="<span class=\"app-holder place-tip\">\u7b2c"+_c26+"\u9875\u53ef\u627e\u5230</span>";
_c19.className="app-item-empty";
_c19.removeAttribute("data-order");
_c19.removeAttribute("data-aid");
this.cancelFavTimer=setTimeout(function(){
_c19.innerHTML="<span class=\"app-holder\">\u62d6\u5165</span>";
_c1b.appendChild(_c19);
if(_c23<=4){
oTip.style.display="";
}
if(this.cancelFavTimer){
this.cancelFavTimer=null;
}
},2000);
new XN.net.xmlhttp({url:"http://apps.renren.com/menu/removeBookmark.do",method:"post",data:"app_id="+_c1f,onSuccess:function(r){
},onError:function(r){
}});
if(ua.ua.ie==6){
Sizzle("em",_c1e)[0].style.display="none";
Sizzle("em",_c1e)[0].style.backgroundPosition="0 0";
}
};
this.dragStart=function(e){
var _c2d=XN.event.element(e);
var _c2e=this.getParent(_c2d,"li");
if(!_c2e){
return;
}
if(_c2d.nodeName.toLowerCase()=="em"&&_c2e){
return;
}
if(_be4.length==0){
this.getFavItemsPos();
}
_be3=true;
_be2=_c2e;
};
this.dragProcess=function(e){
if(!_be3||!_be2){
return;
}
var _c30=XN.event.element(e);
var _c31=this.getParent(_c30,"li");
if(!_c31&&!_be2){
return;
}
if(_be5==0){
_be5=1;
return;
}
if(!_be2.getAttribute("data-dragging")){
_be2=_c31.cloneNode(true);
var _c32;
if(_be2.getAttribute("data-faved")=="t"){
_c32=document.createElement("li");
_c32.className="app-item-empty";
_c32.innerHTML="<span class=\"app-holder\">\u62d6\u5165</span>";
_c32.setAttribute("data-holder","t");
_c31.parentNode.replaceChild(_c32,_c31);
}else{
_c32=_c31.cloneNode(true);
_c32.setAttribute("data-holder","t");
_bd9(_c32,"holder-alpha");
_c31.parentNode.replaceChild(_c32,_c31);
}
this.oAppsWrap.appendChild(_be2);
_be2.style.position="absolute";
_be2.style.left=(XN.element.realLeft(_c32)-XN.element.realLeft(this.oAppsWrap))+"px";
_be2.style.top=(XN.element.realTop(_c32)-XN.element.realTop(this.oAppsWrap))+"px";
_be2.className="app-item-dragging";
_be2.setAttribute("data-dragging","t");
}else{
this.resetDraggingItemPos(e);
if(this.isInFavBox(e)){
if(this.cancelFavTimer){
this.clearCancelFavTimer();
}
var _c33=this.getFavToIndex(_be2);
this.addFavAppHolder(_c33);
}
}
};
this.dragEnd=function(e){
_be3=false;
if(!_be2||_be2.getAttribute("data-dragging")!="t"){
return;
}
var aid=_be2.getAttribute("data-aid");
var _c36;
var _c37=_be2.getAttribute("data-faved");
var _c38=Sizzle("ul.apps-list",this.oMyAppsWrap)[0];
var _c39=Sizzle("li.app-item",_c38);
var oTip=Sizzle("h4",this.oMyAppsWrap)[0];
var _c3b=Sizzle("li.app-item",_c38).length;
if(this.isInFavBox(e)){
if(_c37=="f"){
_c36=Sizzle("li[data-holder=t]",this.oOtherAppsWrap)[0];
_bda(_c36,"holder-alpha");
_c36.removeAttribute("data-holder");
this.fav(_c36);
_be2.remove();
}else{
_c36=Sizzle("li[data-holder=t]",_c38)[0];
_c38.replaceChild(_be2,_c36);
_be2.style.cssText="";
_be2.className="app-item";
_be2.removeAttribute("data-dragging");
if(_c3b<3){
oTip.style.display="";
}else{
oTip.style.display="none";
}
var _c3c="["+this.getFavOrder().join(",")+"]";
new XN.net.xmlhttp({url:"http://apps.renren.com/menu/reorderBookmark.do",method:"post",data:"app_ids="+_c3c,onSuccess:function(r){
},onError:function(r){
}});
}
}else{
if(_c37=="f"){
_c36=Sizzle("li[data-aid="+aid+"]",this.oAppsWrap)[0];
oFavHolder=Sizzle("li[data-holder]",this.oMyAppsWrap)[0];
if(_c39.length==_bdd){
_c39[5].style.display="";
if(oFavHolder){
oFavHolder.remove();
}
}else{
if(oFavHolder){
_c38.appendChild(oFavHolder);
oFavHolder.removeAttribute("data-holder");
}
}
_bda(_c36,"holder-alpha");
_c36.removeAttribute("data-holder");
$(_be2).remove();
}else{
_c36=Sizzle("li[data-holder=t]",_c38)[0];
_c36.parentNode.replaceChild(_be2,_c36);
_be2.style.cssText="";
_be2.className="app-item";
_be2.removeAttribute("data-dragging");
this.cancelFav(_be2);
}
}
_be2=null;
};
this.getFavItemsPos=function(){
};
this.getParent=function(ele,_c40){
var _c41=$(ele);
var _c42=XN.element.matchesSelector;
while(!_c42(_c41,_c40)){
if(_c41.nodeName.toLowerCase()=="body"){
return null;
}
_c41=$(_c41.parentNode);
}
return _c41;
};
this.isInFavBox=function(e){
var _c44=this.oMyAppsWrap;
var x=XN.event.pointerX(e)||e.page.x;
var y=XN.event.pointerY(e)||e.page.y;
var _c47={left:XN.element.realLeft(_c44),top:XN.element.realTop(_c44),right:XN.element.realLeft(_c44)+_c44.offsetWidth,bottom:XN.element.realTop(_c44)+_c44.offsetHeight};
if(x>_c47.left&&x<_c47.right&&y>_c47.top&&y<_c47.bottom){
return true;
}else{
return false;
}
};
this.getFavItemsPos=function(){
var _c48=Sizzle("li",this.oMyAppsWrap);
var _c49=_c48[0].offsetWidth;
var _c4a=_c48[0].offsetHeight;
for(var i=0,len=_c48.length;i<len;i++){
var _c4d={};
_c4d.left=_bdb(_c48[i]);
_c4d.top=_bdc(_c48[i]);
_c4d.right=_bdb(_c48[i])+_c49;
_c4d.bottom=_bdc(_c48[i])+_c4a;
_be4.push(_c4d);
_c4d=null;
}
};
this.getItemPos=function(_c4e){
var pos={};
var _c50=_c4e.offsetWidth;
var _c51=_c4e.offsetHeight;
pos.left=_bdb(_c4e);
pos.top=_bdc(_c4e);
pos.right=_bdb(_c4e)+_c50;
pos.bottom=_bdc(_c4e)+_c51;
return pos;
};
this.getFavToIndex=function(_c52){
var _c53=this.getItemPos(_c52);
var _c54=_c52.getAttribute("data-faved");
var _c55=Sizzle("li.app-item",this.oMyAppsWrap);
var _c56=Sizzle("li",this.oMyAppsWrap);
var len=_be4.length;
var _c58=len-1;
var _c59=10000;
for(var i=0;i<len;i++){
if(Math.abs(_c53.left-_be4[i].left)<_c59){
_c59=Math.abs(_c53.left-_be4[i].left);
_c58=i;
}
}
if(_c58>=_c55.length){
_c58=_c55.length;
}
return _c58;
};
this.addFavAppHolder=function(_c5b){
var _c5c=Sizzle("ul.apps-list",this.oMyAppsWrap)[0];
var _c5d=Sizzle("li.app-item",_c5c);
var _c5e=Sizzle("li",_c5c);
var _c5f=Sizzle("li.app-item-empty[data-holder=t]",_c5c)[0];
if(!_c5f){
_c5f=Sizzle("li.app-item-empty",_c5c)[0];
}
if(_c5f){
if(_c5d[_c5b]){
_c5c.insertBefore(_c5f,_c5d[_c5b]);
}else{
if(_c5e[_c5b+1]){
_c5c.insertBefore(_c5f,_c5e[_c5b+1]);
}else{
_c5c.appendChild(_c5f);
}
}
}else{
_c5f=document.createElement("li");
_c5f.innerHTML="<span class=\"app-holder\">\u62d6\u5165</span>";
_bd9(_c5f,"app-item-empty");
_c5c.insertBefore(_c5f,_c5d[_c5b]);
_c5d[_bdd-1].style.display="none";
}
_c5f.setAttribute("data-holder","t");
};
this.removeFavAppHolder=function(_c60){
};
this.pageCtrl=function(num){
var box=Sizzle("ul.apps-list",this.oOtherAppsWrap)[0];
var oLis=Sizzle("li",box);
var _c64=Sizzle("div.page-ctrl",this.oAppsWrap)[0];
var _c65=Sizzle("a.page-pre",_c64)[0];
var _c66=Sizzle("a.page-next",_c64)[0];
var _c67=Math.ceil(oLis.length/_bdf);
var _c68=(_be0-1)*_bdf;
var _c69=_c68+_bdf-1;
var _c6a=(num-1)*_bdf;
var _c6b=_c6a+_bdf-1;
var _c6c=box.cloneNode(true);
var _c6d=$("appsRallWrap");
var _c6e=null;
var _c6f=3;
if(oLis.length==0){
this.pageSet(0);
return;
}else{
if(oLis.length==6){
this.pageSet(1);
return;
}else{
if(oLis.length==7){
this.pageSet(1);
return;
}
}
}
for(var i=0,len=oLis.length;i<len;i++){
oLis[i].style.display="none";
}
while(_c6a<=_c6b&&oLis[_c6a]){
oLis[_c6a].style.display="";
_c6a++;
}
if(num<_be0){
rull("right");
}else{
if(num>_be0){
rull("left");
}
}
_bda(Sizzle("a.page-"+_be0,_c64)[0],"act");
_bd9(Sizzle("a.page-"+num,_c64)[0],"act");
if(num==1){
_bd9(_c65,"disable");
}else{
_bda(_c65,"disable");
}
if(num==_c67){
_bd9(_c66,"disable");
}else{
_bda(_c66,"disable");
}
_be0=num;
_c6e=Sizzle("li.app-item",box);
_c6f=Math.ceil(_c6e.length/12);
if(_c6f!=_be1){
this.pageSet(_c6f);
}
if(_be0>_c6f){
this.pageCtrl(_c6f);
}
function rull(_c72){
if(window.dropAppsRullTmpTimer||window.dropAppsRullTimer){
clearTimeout(window.dropAppsRullTmpTimer);
clearTimeout(window.dropAppsRullTimer);
window.dropAppsRullTmpTimer=null;
window.dropAppsRullTimer=null;
}
var _c73=_c72=="left"?-397:397;
var _c74=_c72=="left"?-45:45;
var _c75=25;
if(!_c6d){
_c6d=$element("div");
_c6d.setAttribute("id","appsRallWrap");
_c6d.style.display="none";
box.parentNode.appendChild(_c6d);
}
_c6d.innerHTML="";
_c6d.appendChild(_c6c);
_c6d.style.display="";
_c6c.style.marginLeft=_c74+"px";
var _c76=window.dropAppsRullTmpTimer=setInterval(function(){
var left=_c6c.style.marginLeft.split("px")[0];
if(Math.abs(parseInt(left)-_c73)>Math.abs(_c74)){
_c6c.style.marginLeft=parseInt(left)+_c74+"px";
}else{
clearInterval(_c76);
_c6d.style.display="none";
_c6d.innerHTML="";
_c6c=null;
}
},_c75);
box.style.marginLeft=(0-_c73)+"px";
var _c78=window.dropAppsRullTimer=setInterval(function(){
var left=box.style.marginLeft.split("px")[0];
if(Math.abs(parseInt(left))>Math.abs(_c74)){
box.style.marginLeft=parseInt(left)+_c74+"px";
}else{
box.style.marginLeft="2px";
clearInterval(_c78);
}
},_c75);
}
};
this.pageSet=function(_c7a){
var _c7b=Sizzle("div.page-ctrl",this.oAppsWrap)[0];
var _c7c=Sizzle("a.page-1",_c7b)[0];
var _c7d=Sizzle("a.page-2",_c7b)[0];
var _c7e=Sizzle("a.page-3",_c7b)[0];
var _c7f=Sizzle("a.page-pre",_c7b)[0];
var _c80=Sizzle("a.page-next",_c7b)[0];
var _c81=Sizzle("p.apps-tips",this.oAppsWrap)[0];
var _c82=Sizzle("a.apps-center-btn",this.oAppsWrap)[0];
var _c83=Sizzle("li.app-item",this.oOtherAppsWrap).length;
switch(_c7a){
case 0:
_c7b.style.display="none";
_c81.style.display="";
_c82.style.display="";
break;
case 1:
_c7c.style.display="";
_c7d.style.display="none";
_c7e.style.display="none";
_bd9(_c80,"disable");
_bd9(_c7f,"disable");
if(_c83<=6){
_c7b.style.display="none";
_c82.style.display="";
_c81.style.display="";
}else{
_c7b.style.display="";
_c82.style.display="none";
_c81.style.display="none";
}
break;
case 2:
_c7c.style.display="";
_c7d.style.display="";
_c7e.style.display="none";
_c7b.style.display="";
_c81.style.display="none";
_c82.style.display="none";
break;
case 3:
_c7c.style.display="";
_c7d.style.display="";
_c7e.style.display="";
_c7b.style.display="";
_c81.style.display="none";
_c82.style.display="none";
break;
}
_be1=_c7a;
};
this.getItemPageIndex=function(_c84){
var apps=Sizzle("li.app-item",this.oOtherAppsWrap);
var _c86=apps.length;
var _c87=1;
var _c88=_c86;
_c87=Math.ceil((_c88+1)/12);
};
this.getFavOrder=function(){
var apps=Sizzle("li.app-item",this.oMyAppsWrap);
var _c8a=[];
for(var i=0,len=apps.length;i<len;i++){
_c8a.push(apps[i].getAttribute("data-aid"));
}
return _c8a;
};
this.resetDraggingItemPos=function(e){
var x=XN.event.pointerX(e)||e.page.x;
var y=XN.event.pointerY(e)||e.page.y;
_be2.style.left=(x-XN.element.realLeft(this.oAppsWrap)-20)+"px";
_be2.style.top=(y-XN.element.realTop(this.oAppsWrap)-20)+"px";
};
this.clearCancelFavTimer=function(){
var _c90=Sizzle("ul.apps-list",this.oMyAppsWrap)[0];
var _c91=Sizzle("li.app-item-empty",_c90);
if(this.cancelFavTimer){
_c91[0].innerHTML="<span class=\"app-holder\">\u62d6\u5165</span>";
_c91[0].removeAttribute("data-holder");
_c90.appendChild(_c91[0]);
clearTimeout(this.cancelFavTimer);
this.cancelFavTimer=null;
}
};
this.setDraggingItem=function(type){
if(!type||!_be2){
return;
}
var tmpA=Sizzle("a",_be2)[0];
Sizzle("em",_be2)[0].style.display="none";
if(type=="add"){
tmpA.style.border="0";
tmpA.style.backgroundColor="inherit";
tmpA.style.boxShadow="none";
_be2.setAttribute("data-dragging","t");
}
};
this.addHolder=function(_c94){
};
this.removeHolder=function(_c95){
};
this.debug=function(con){
var o=$("debug");
o.value=con+"\n"+o.value;
};
});
object.use("xn.appsDropMenu",function(_c98,xn){
window.AppsDropMenu=xn.appsDropMenu;
});
object.use("dom, ua, ua.extra, ua.flashdetect",function(_c9a,dom,ua){
var str="?";
var core=ua.ua.core;
var _c9f=ua.ua.shell;
var _ca0=ua.ua[core];
if(_ca0){
str+="&"+(core+"="+_ca0);
}
var _ca1=ua.ua[_c9f];
if(_ca1){
str+="&"+(_c9f+"="+_ca1);
}
if(_c9f!="ieshell"&&ua.ua.ieshell){
str+="&ieshell="+ua.ua.ieshell;
}
var _ca2=ua.flashdetect.getFlashVersion();
if(_ca2){
str+="&"+("flash="+_ca2);
}
XN.net.sendStats("http://s.renren.com/speedstats/browser/stats.php"+str);
var desc,url,key=1;
var _ca6={"se360":"360\u5b89\u5168\u6d4f\u89c8\u5668","sogou":"\u641c\u72d7\u6d4f\u89c8\u5668","maxthon":"\u50b2\u6e38\u6d4f\u89c8\u5668","theworld":"\u4e16\u754c\u4e4b\u7a97\u6d4f\u89c8\u5668","qqbrowser":"QQ\u6d4f\u89c8\u5668","tt":"\u817e\u8bafTT\u6d4f\u89c8\u5668"};
var _c9f=_ca6[ua.ua.shell]||"\u517c\u5bb9\u6d4f\u89c8\u5668";
if(ua.ua.ie>=6&&ua.ua.ie<7){
var now=new Date().getTime();
if(now>=1309503600000&&now<=1309514400000&&XN.cookie.get("fie")!=2){
key=2;
url="http://noie6.renren.com/";
desc="\u4eba\u4eba\u7f51\u6e29\u99a8\u63d0\u793a\uff1a\u4f18\u5316\u4e0a\u7f51\u4f53\u9a8c\uff0c\u4f53\u9a8c\u6781\u901f\u4e4b\u65c5 <a href=\"http://noie6.renren.com/down/360cse-promote\" style=\"text-decoration:none\"><img src=\"http://a.xnimg.cn/sites/noie6/res/browsers/360cse-icon.png\" style=\"vertical-align:text-bottom\" /> 360\u6781\u901f\u6d4f\u89c8\u5668</a>&nbsp;&nbsp;&nbsp;<a href=\"http://noie6.renren.com/down/sogou-promote\" style=\"text-decoration:none\"><img src=\"http://a.xnimg.cn/sites/noie6/res/browsers/sogou-icon.png\" style=\"vertical-align:text-bottom\" /> \u641c\u72d7\u9ad8\u901f\u6d4f\u89c8\u5668</a>";
}else{
if(!XN.cookie.get("fie")){
if(ua.ua.shell=="ieshell"){
url="http://noie6.renren.com/";
desc="\u81f4IE6\u7528\u6237\u7684\u4e00\u5c01\u4fe1";
}else{
url="http://dl.xnimg.cn/down/IE8-WindowsXP-x86-CHS.exe";
desc="\u5c0a\u656c\u7684\u7528\u6237\uff0c\u60a8\u76ee\u524d\u4f7f\u7528\u7684\u662fIE6\u5185\u6838\u7684"+_c9f+"\uff0c\u4e3a\u4e86\u7ed9\u60a8\u5e26\u6765\u66f4\u5feb\u901f\u3001\u66f4\u5b89\u5168\u3001\u66f4\u4f18\u8d28\u7684\u4f53\u9a8c\uff0c\u4eba\u4eba\u7f51\u5c06\u9010\u6b65\u964d\u4f4eIE6\u5185\u6838\u7684\u652f\u6301\uff0c\u6211\u4eec\u5efa\u8bae\u60a8\u5c3d\u5feb<a href=\""+url+"\">\u5347\u7ea7\u60a8\u7684\u7cfb\u7edf\u6d4f\u89c8\u5668\u4e3aIE8</a>\uff0c\u8fd9\u4e0d\u4f1a\u5bf9\u60a8\u4f7f\u7528"+_c9f+"\u4ea7\u751f\u4efb\u4f55\u5f71\u54cd\uff0c\u611f\u8c22\u60a8\u7684\u652f\u6301\u3002";
}
}
}
if(url&&desc){
dom.ready(function(){
var div=document.getElementById("ie6notice");
if(div){
div.innerHTML="<div style=\"position:relative;\"><div onclick=\"window.open('"+url+"');\" style=\"cursor:pointer;background:#FFFBC1;border-bottom:1px solid #F9B967;padding:5px;text-align:center;font-size:14px;\"><div style=\"width:965px;padding-right: 15px;\">"+desc+"</div></div><a href=\"#nogo\" onclick=\"XN.cookie.set('fie',"+key+",30,'/','renren.com');$('ie6notice').hide();return false;\" class=\"x-to-hide\" style=\"height:14px;width:14px;overflow:hidden;position:absolute;top:8px;right:10px;\" title=\"\u5173\u95ed\"></a></div>";
}
});
}
}
});
object.use("net",function(_ca9,net){
var _cab=window.location.hostname;
_ca9.handleClientError=function(){
if(_cab.indexOf("renren.com")==-1){
return true;
}
if(arguments.length!==3||arguments[2]===0){
return true;
}
var xhr=new net.Request({onsuccess:function(_cad){
},onerror:function(_cae){
}});
xhr.method="GET";
xhr.url="http://s.renren.com/speedstats/jserror/stats.php?"+"message="+encodeURIComponent(arguments[0])+"&url="+encodeURIComponent(arguments[1])+"&lineNo="+arguments[2]+"&time="+getCurrentTimeString();
xhr.send(null);
return true;
function getCurrentTimeString(){
var date=new Date();
var _cb0=date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
return _cb0;
}
};
});
XN.dom.ready(function(){
XN.event.addEvent(document,"mouseover",function(e){
var _cb2=$(XN.event.element(e||window.event));
if(!_cb2.hasClassName("share_new")){
return false;
}
if(!window.XNShareObject){
setTimeout(function(){
XN.loadFile("http://s.xnimg.cn/jspro/xn.app.share.js",function(){
XNShareObject._register({autoRegister:false,floatMode:true});
XNShareObject.forceShowFloat(_cb2);
});
},0);
}
});
});

